473,796 Members | 2,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

parent window know when a child window is closed

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 as this will be populated and managed by a
client.. i need to know when this will be closed though to reload the
parent window..

thanks
Jul 23 '05 #1
3 2521
Kiki wrote:
Is there a way of knowing from the parent window (var window;) that
the child window (var newWindow) has been closed? [...]


<http://groups.google.c om/groups?as_q=win dow+closed&as_u group=comp.lang .javascript&sco ring=d&filter=0 >
Jul 23 '05 #2
On 28 Jul 2004 03:48:47 -0700, ki**@dyky.co.uk (Kiki) wrote:
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 as this will be populated and managed by a
client.. i need to know when this will be closed though to reload the
parent window..

thanks

use the .closed property.

A read-only boolean value that specifies whether the window has been
closed. When a browser window closes, the Window object that
represents it does not simply disappear. The Window object continues
to exists, but its "closed" property is set to true. (source:
javascript: The Difinitive guide pg 653)
eg
if (newWindow.clos ed) {
alert('The Popup window no longer exists');
}
HTH

Al.

Jul 23 '05 #3

thank you for your reply Harag.. if i do it the way you suggested then i
will have to put a timer that will check every so often if the child
window has been closed..
I was just wondering if there was a better way of doing this..

thanks again..
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #4

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

Similar topics

2
5583
by: mannerfanner | last post by:
In order to reload the opener window from a child window I want to check the parent windows state. The following code works fine in IE and Mozilla: if(top.opener && !top.opener.closed) { top.opener.location.reload(); } BUT ... The state check works because IE recognises top.opener.closed
2
2447
by: John Dalberg | last post by:
I have a closed box system which opens an html page. The page closes by the system. I have access to the html page. I added code to open a child window from this page. However when the parent window closes, the child closes too. Is there a way to keep the child window open? Yes keep it orphaned. -- John Dalberg
1
2260
by: Tomas Vera | last post by:
Hello All, I'm working on a web app that will simulate a Windows app. One of the items that I've trouble reproducing is the parent/child interaction that might occur between a windo and popup custom dialog box (example: right click an item and bring up a Config/Properties dialog of the selected item). In a Windows app, I can add a handler in the Parent to respond to the "OK" event in the child window so that I can update the object's
10
4030
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the application. What should happen, is that the main MDI form should close, taking the child forms with it. There is code to loop through the child forms, remove the controls on each of them, and then close the form, but this code should execute only...
1
2327
by: Richard | last post by:
Greetings. I am total newbie to Javascript so what is written below is probably a bunch of cobblers!! Any assistance in correcting my code much appreciated. I wish the popped up child to pass value from the select box to a text box on the parent form. Here are my pages (in part)
4
3182
by: reemamg | last post by:
From a parent window a new child window is open with window.open <script type="text/javascript" language="JavaScript" > function abc() { if(window.event.clientY <0 && window.event.clientY <-80 ) { if (win2 && !win2.closed) // win 2 is the child window
2
7263
by: Jeff | last post by:
I have a Form parent window with a list view on it. When I click on an item I open another form to edit the details - this is not and cannot be a dialog window. When I close the child window I would like the parent window to automatically refresh by calling a method RefreshData(). How can I achieve this. Regards
2
3216
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 (main browser window) b.jsp--> parent window (pop up window) c.jsp--> child window (pop up window) I need to call a function from a.jsp in c.jsp when b.jsp is closed.
0
9685
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
9531
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
10459
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
10237
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
10187
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,...
0
10018
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9055
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6795
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
4120
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

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.