javascript - js: How navigate to new url and get callBack when page is loaded? -


i trying implement js function navigates 3rd party url , call function once page loaded;

document.location = "http://ww.example.com"; window.onload = function () { alert('example.com page loaded!") } 

can done ?

you can't.

the execution environment first page destroyed before 1 new page created. cannot interact.

the closest come pass data (through url / cookie / local storage) other page in script runs on it.


Comments

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

javascript - How to change image src on success AJAX -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -