Top "Onload" questions

'onload' is a JavaScript event that is run when a document is loaded.

How do I call a JavaScript function on page load?

Traditionally, to call a JavaScript function once the page has loaded, you'd add an onload attribute to the body containing …

javascript onload
How to run a function when the page is loaded?

I want to run a function when the page is loaded, but I don’t want to use it in …

javascript html onload
How to execute AngularJS controller function on page load?

Currently I have an Angular.js page that allows searching and displays results. User clicks on a search result, then …

angularjs onload
How to run function in AngularJS controller on document ready?

I have a function within my angular controller, I'd like this function to be run on document ready but I …

javascript angularjs onload
Cannot set property 'innerHTML' of null

Why do I get an error or Uncaught TypeError: Cannot set property 'innerHTML' of null? I thought I understood innerHTML …

javascript onload innerhtml
Javascript - How to detect if document has loaded (IE 7/Firefox 3)

I want to call a function after a document loads, but the document may or may not have finished loading …

javascript events onload addeventlistener
jquery get height of iframe content when loaded

I have a Help page, help.php that I am loading inside an iframe in main.php How can I …

jquery iframe height onload
iFrame src change event detection?

Assuming I have no control over the content in the iframe, is there any way that I can detect a …

javascript jquery iframe onload
Setting focus on an HTML input box on page load

I'm trying to set the default focus on an input box when the page loads (example: google). My page is …

javascript html focus onload autofocus
iFrame onload JavaScript event

I have an iFrame, where I want to send a JavaScript command after loading. My current code looks like this: &…

javascript iframe dom-events onload onload-event