473,395 Members | 2,079 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.

window handle state {...}

I have a parent/child relationship between two windows. The parent
spawns the child using something like this.

windowHandle = window.open("child.aspx","child");

the problem is that if the child window closes then the windowHandle
object is left in an orphaned state. It does't equate to null and I'm
not sure how to check and see if the window still exists. The child
does notify the parent window through the window.opener object when it
closes but this does not work in EVERY case.

I'm looking for something like "if isnothing(windowHandle)"

thanks
will

Jul 23 '05 #1
3 2670
VK
In your child.aspx :
<body onUnload="self.opener='null';"

Would be nice to have self-updating window-refs, but it would possibly
compromise the unter-domain security.
Jul 23 '05 #2

VK,

Thanks for the quick response. I am currently performing some similar
code in the onload event but the problem is that if the child page
reloads because of an autopost back of a drop down control then the
onunload event fires and I don't want to seperate the parent and the
child at that point, only when the child window closes. This is the
problem I'm trying to work around. I just wish there was an event that
signals the window closing and not just unload the html.
will
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3
"Will" <Wi********@Yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have a parent/child relationship between two windows. The parent
spawns the child using something like this.

windowHandle = window.open("child.aspx","child");

the problem is that if the child window closes then the windowHandle
object is left in an orphaned state. It does't equate to null and I'm
not sure how to check and see if the window still exists. The child
does notify the parent window through the window.opener object when it
closes but this does not work in EVERY case.

I'm looking for something like "if isnothing(windowHandle)"


<url: http://jibbering.com/faq/#FAQ4_10 />

windowHandle is not in an "orphaned" state. It's -closed- property is
set to true. You can test for that.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: danny | last post by:
Is there a way I can prevent the browser window from being closed? I'd like to make sure the browser window only closes programatically (I want to make sure the user enters data before moving on)....
5
by: DraguVaso | last post by:
Hi, How can you see with a VB.NET-application if the Window of another Application (for exemple an opened Word-Document) is Mimized? Is there also a way to see if it is Maximized? Thanks a...
6
by: news.versatel.de | last post by:
Hello NG, I am using javascript to open a new window like this: printpreview=window.open('printview.php','printprev','width=600,height=600'); The new window has a layer called preview: ...
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...
6
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle."...
8
by: Luke Matuszewski | last post by:
I have read all posts about how to detect that url have changed to new page and trigger the event handler then eg. function aidLogout(evt) { if(evt) { /* maybe via analyse of evt object i can...
0
by: pavan377 | last post by:
Hi folks, I got a requirement in my project where in when my application is activated another window should get activated and upon it my application should be present. Both should be in restored...
5
by: Sommer.pde | last post by:
It took me some time to find out when and why this happens. When the window of Internet Explorer is closed with an AJAX call still pending, something funny happens. Do it twice, and you will have...
3
by: Tomasz J | last post by:
Hello Developers! A lot has been written about Java Script window.open() function and lost session state. But the most recent version of IE seems to handle it correctly. But now I have an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.