473,509 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

when popup window content loaded

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
3 3442
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
12396
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank,...
2
1837
by: Bill S. | last post by:
Hey, I am trying to figure this out. The hyperlinks on my page open up a small popup window. I have no reason to refresh the parent page or what have you. I was living in a very happy world,...
3
3931
by: Stevie_mac | last post by:
It might be me but... I dont seem to get a Page_Load event when a opening an ASPX in an iFrame. I do geta Page_Load event when an item on the ASPX (inside the iFrame) is clicked but then...
7
3685
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a...
4
10001
by: Ali | last post by:
i am using visual studio 2005 and I am trying to create a popup calender so when a user click on a image on the main form, a calender will then popup, the user will select a date and the date will...
1
3476
by: Matt Jensen | last post by:
Howdy I've got a ASP.NET webform page that pops up a window for a user to make a selection. Once they make a selection in this popup window, the form in the popup is submitted an update to the...
7
3649
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
21
18113
by: alistair_henderson | last post by:
Morning All, I have some code for a website which uses 'window.open' to simulate modal dialog boxes. I use the window.closed property to decide if the window object exists at various points. ...
2
2320
by: sangram | last post by:
i need a javascript for popup window and how to pass value to that new window from old window .
0
7233
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.