I'd like to be able to call a jquery function once window.location has completed loading a URL. Is this possible? I can't seem to find anything online about this.
for instance:
if(parseInt(msg.status)==1) {
window.location=msg.txt;
alert("This URL has finished loading")
}
Thanks, -Paul
You can either use window.onload
of the destination page (if you have access to modify the code of that page), or you can use window.onunload
to have the alert be launched when unloading the current page. You cannot execute code on the current page after the new page has been loaded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With