javascript - Is there a way to open a new window (applicable for onload=) in a existing window? -
so ok, following works:
w=window.open(url); w.onload=function (){};
but then, when want open second new window (where first new window processed function(){},i.e. becomes garbage collected) replacing first new window, tried following utterly fails:
w.location.href=url; w.onload=function (){};
i wondering there solution this? since onload have power on child window, should in someway have power on child-window-replacement.
yup, can load specific window using reference name.
for example, if opened window with:
var w = window.open(url,"window1");
you can load url same window referencing name - second parameter. example:
window.open(url,"window1");
check out: http://jsfiddle.net/jpxnc/1/
Comments
Post a Comment