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

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -