Top "Onload" questions

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

Is there a way to have an onload callback after changing window.location.href?

Essentially what I'd like to do is something to the effect of this: window.location.href = "some_location"; window.onload = …

javascript onload window.location
Calling a servlet from JSP file on page load

Can I call a servlet from JSP file without using a HTML form? For example, to show results from database …

java jsp servlets onload
Async-loaded scripts with DOMContentLoaded or load event handlers not being called?

I've got a script with a DOMContentLoaded event handler— document.addEventListener('DOMContentLoaded', function() { console.log('Hi'); }); Which I'm loading asynchronously— &…

javascript dom onload
MVVM load data during or after ViewModel construction?

My generic question is as the title states, is it best to load data during ViewModel construction or afterward through …

data-binding constructor viewmodel onload mvvm-light
Want to call a function if iframe doesn't load or load's?

I have a iframe in my page. If the iframe doesn't load, want it to alert the message "pdf not …

javascript html iframe onload
how to call a window's Loaded event in WPF MVVM?

It is easy enough to create a command from my OnLoaded() event handler code, but how do I call it …

wpf xaml mvvm window onload
javascript, image onload() doesnt fire in webkit if loading same image

I have an <img> element and I'm changing its src attribute. The element has an onload handler function …

javascript image webkit onload
How to jQuery slidedown once page has already been loaded

I am having a timing issue when attempting to slide down my more info div. My desired functionality is that …

jquery onload pageload slidedown
window.onload in external script gets ignored in Javascript

index.html <html> <head> <script type="text/javascript" src="foo.js"></script> &…

javascript window external onload domready
javascript: onload and onerror called together

I'm new to JavaScript and therefore confused for the variable scope... I'm trying to load an image, and replace it …

javascript scope d3.js onload onerror