472,981 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,981 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 2649
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.