I wish a page to fully load before issuing an ajax call to update database. I can call a javascript function in the body onload event so the page is fully loaded, but I\'m n
This is really easy using a JavaScript library, e.g. using jQuery you could write:
$(document).ready(function(){
$.ajax({ url: "database/update.html",
context: document.body,
success: function(){
alert("done");
}});
});
Without jQuery, the simplest version might be as follows, but it does not account for browser differences or error handling:
See also: