• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

check whether a page is loaded

 
Karishma Kuriachan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not call the window to read its content until after the window has fully loaded.

Eric
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic