when popup window content loaded

A

Andrew Poulos

From a window opener how can I know when a popup window's content has
loaded? I tried:

var pop = window.open(url, str);
pop.onload = something;

which triggers in some browsers but not in IE. For IE I tried

pop.onreadystatechange = function() {
if (pop.readyState == "complete") {
something();
}
};

but it never seemed to trigger.

Andrew Poulos
 
D

Doug Gunnoe

 From a window opener how can I know when a popup window's content has
loaded? I tried:

var pop = window.open(url, str);
pop.onload = something;

which triggers in some browsers but not in IE. For IE I tried

pop.onreadystatechange = function() {
   if (pop.readyState == "complete") {
     something();
   }

};

but it never seemed to trigger.

Andrew Poulos

Did you try "pop.document.body.onload = something" ?
 
T

Thomas 'PointedEars' Lahn

Andrew said:
From a window opener how can I know when a popup window's content has
loaded?

You can't. However, you can know from a popup when its document has
finished loading, and you can notify the opener then.
I tried:

var pop = window.open(url, str);
pop.onload = something;

which triggers in some browsers but not in IE. [...]

There is a race condition to begin with.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top