sorlaker
01-03-2012, 12:51 PM
How can i run a script after the window.open loads completely?
|
||||
Jquery - How to run script after window.open loads?sorlaker 01-03-2012, 12:51 PM How can i run a script after the window.open loads completely? Amphiluke 01-03-2012, 12:56 PM The window.open() method returns a reference to a window object. You may use it to add a "load" event handler. var wnd = window.open("url.html", "", ""); wnd.onload = function() { alert("complete"); }; sorlaker 01-03-2012, 01:19 PM Can i make a statement with that? like if (win.onload == true){ } Amphiluke 01-03-2012, 01:34 PM var wnd = window.open("url.html", "", ""); wnd.onload = function() { wnd.wndLoaded = true; }; // ... if (wnd.wndLoaded === true) { // ... } ? DanInMa 01-03-2012, 04:20 PM since you asked about jquery specifically : http://docs.jquery.com/Tutorials:Introducing_$(document).ready() |
| |||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum