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

Detecting closed parent window from popup

P: n/a
I have a little bit of code in a popup window that attempts to detect
when the parent window is closed or rather just jumped to another page
url.

the expression below is used in a popup created from a frame in the
parent window:

self.opener.closed

This yields 'false' while the parent is opened. The problem is, it
always gives a 'false' even if the parent window moves to another url.
However, if the browser is closed then the expression yields 'true'.

What approach should I use to determine if the parent window from
which the popup is called is changed or closed?

--
***********************************
* Bob Dickow (di****@uidaho.edu) *
* Hampton School of Music *
***********************************
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Robert Dickow hu kiteb:
I have a little bit of code in a popup window that attempts to detect
when the parent window is closed or rather just jumped to another page
url.

the expression below is used in a popup created from a frame in the
parent window:

self.opener.closed

This yields 'false' while the parent is opened. The problem is, it
always gives a 'false' even if the parent window moves to another url.
However, if the browser is closed then the expression yields 'true'.

What approach should I use to determine if the parent window from
which the popup is called is changed or closed?


You could check to see the url contained within the parent window. If it
returns one of yours, you can probably assume it hasn't been changed or
closed.

If the guy disconnects while on your page, all bets are off as to
whetehr your function will work as intended.
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.