I am using following code to execute some statements after page load.
<script type="text/javascript">
window.onload = function () {
newInvite();
document.ag.src="b.jpg";
}
</script>
But this code does not work properly. The function is called even if some images or elements are loading. What I want is to call the function the the page is loaded completely.
$(window).load()
alert
function before the window redraws (making it look like it's called before load)? The code looks fine, and forcing users to download large libraries probably won't fix this issue or make it any easier to diagnose.width
is greater than 0.