473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Detecting closed parent window from popup

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

Similar topics

13
by: dave yan | last post by:
hi, i have some forms which use javascript for data validation, e.g., checking to make sure all required fields are completed, checking that data falls within valid ranges for certain fields,...
2
by: Dom Nicholas | last post by:
Hi, My question is this : how do I detect from another window which didn't create a new window whether it exists ? For example, is there a window-id's container of some sort that hangs around...
4
by: Hal | last post by:
Can someone please tell me what is wrong with this script? <script language="JavaScript"> <!-- function HF_CloseAllChildren() { if (g_win1) != undefined { if ((g_win1) && !(g_win1.closed))...
3
by: Kiki | last post by:
Hello, i wonder if anyone can help.. Is there a way of knowing from the parent window (var window;) that the child window (var newWindow) has been closed? i can't touch the child window's closed...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
2
by: lrlebron | last post by:
I am trying to create popup windows with dynamic variable names and then see if they exist or not. For example, if I call the function like so openWin("2600","2000") I would like the function to...
6
by: SAL | last post by:
Hi, VS2005 post I'm opening a window using the following syntax: Protected Sub lbEstValue_Click(ByVal sender As Object, ByVal e As System.EventArgs)...
2
by: ad08 | last post by:
Is this possible? I am trying to access function from grand parent window (the main window) in my child popup window but the parent window is closed in this case. a.jsp --> grand parent window...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.