File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes check whether a page is loaded Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "check whether a page is loaded " Watch "check whether a page is loaded " New topic
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
    
    6
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: check whether a page is loaded
 
Similar Threads
how to determine if an open IE window has toolbars using Javascript
Regarding response.sendredirect
how to refer to new window using javascript
Check if Child Window Fully Loaded
how to open an html page in a new window along with some divisions hidden.