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 not sure how to trigger the Ajax call from there.Is there any better way of achieiving this (Upadating database after page load)?
Share
This is really easy using a JavaScript library, e.g. using jQuery you could write:
Without jQuery, the simplest version might be as follows, but it does not account for browser differences or error handling:
See also: