473,789 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

window handle state {...}

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

windowHandle = window.open("ch ild.aspx","chil d");

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(windo wHandle)"

thanks
will

Jul 23 '05 #1
3 2689
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********@Yah oo.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I have a parent/child relationship between two windows. The parent
spawns the child using something like this.

windowHandle = window.open("ch ild.aspx","chil d");

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(windo wHandle)"


<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*****@agrico reunited.com>
comp.lang.javas cript 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
2554
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). Another possible solution would be to re-open the window when it's closed. Any help is appreciated, thanks.
5
1823
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 lot, Pieter
6
1920
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: <div id="preview"></div>
4
22213
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 description and a class_id (stored in the value attribute of each option). The user will then select a class from the drop-down list. What I want to do is have a control in the parent browser window which can store the class_id and the...
6
3254
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." exception. The problem is that this exception isn't raised somewhere in a method, so it just shows up, and it causes the application to shut down. Is there anyway how to catch this kinds of exceptions? Can I put somewhere a
8
17383
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 detect the close of the browser window */ } if(window.event) { /* maybe via analyse of window.event object i can detect the close of the browser window */
0
1765
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 state not maximised. To accomplish this, in the activated event of my MainForm I first activated the other window and then activated my window. I've implemented the following piece of code in the activated event of my MainForm: private void...
5
13931
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 to restart the browser. Here a little sample: http://truefriendz.de/iedos The script on this site will open 5 test-windows one at a time.
3
2654
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 opposite problem: how to open a new browser window so it *does not* share the session state with the first (parent) window? I have a web application which must open a new popup window, but new session
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10408
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4092
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 we have to send another system
3
2909
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.