By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,316 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

when popup window content loaded

P: n/a
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
Nov 12 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Nov 11, 9:35*pm, Andrew Poulos <ap_p...@hotmail.comwrote:
*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" ?
Nov 12 '08 #2

P: n/a
Doug Gunnoe wrote:
On Nov 11, 9:35 pm, Andrew Poulos <ap_p...@hotmail.comwrote:
> 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" ?
Just did. No joy :-(

Andrew Poulos
Nov 12 '08 #3

P: n/a
Andrew Poulos wrote:
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
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Nov 12 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.