| Author |
check whether a page is loaded
|
Karishma Kuriachan
Greenhorn
Joined: Sep 19, 2007
Posts: 5
|
|
Hi, I need to open a new window(having same url as parent window)from parent window. Can we somehow check whether a new is completely loaded in the javascript so that I can do some manupulations on new window? function fnFloat(){ /* getting the url of current(parent window */ url=self.location; alert("before rewriting:"+url); /* rewriting the url pass one variable through url*/ url=url+"&float=1"; alert("after rewriting:"+url); /* opening new window with the same url(with variable float)*/ myWin = window.open(''+url,'myWin','left=20,top=20,width=800,height=500,toolbar=1,resizable=1,scrollbars=1,location=1'); /* want to do some manupulation here with 'myWin' object.... such as myWin.document.getElementById("float"); which is not working...I am getting null value as the new window is not loaded*/ } Can anyone suggest some solution for this?? Thanks in advance, Regards, Karishma [ September 20, 2007: Message edited by: Karishma Kuriachan ]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
You can not call the window to read its content until after the window has fully loaded. Eric
|
 |
Stan James
(instanceof Sidekick)
Ranch Hand
Joined: Jan 29, 2003
Posts: 8791
|
|
You can go the other way ... Now it's up to script in the new window to call parent.acceptDataFromChild() when it's fully loaded. Does that make sense?
|
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
|
 |
 |
|
|
subject: check whether a page is loaded
|
|
|