473,406 Members | 2,894 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,406 software developers and data experts.

Kill Child window problem

Hello again everyone,

I seem to have run into another problem... perhaps I'm just a bit slow.

The problem is something like this:
I have a popup window launched by a page sourced in an iFrame [master.html |
slave.html -> child_popup.html] and would like to find a method to close all
windows (popups) when the master window is closed. I have found a fair
amount of documentation on this fairly straightforward process however, it
would seem that the inclusion of iFrames screws with the settings somewhere
along the line.

How do would I make it so the "master" is aware of the "slave's" "children"?
Oh, to add insult to injury, index.html is also a static frameset (top nav,
bottom content) - though I don't think this should really effect anything so
long as the onUnload="childwindow.close()" lives in <frameset>
Basically, I know how to do it, just not how to get everyone talking to
eachother in a successful manner.

Any help would be greatly appreciated!

Thanks in advance!

|veganeater|
Jul 23 '05 #1
2 3483
veganeater wrote:
Hello again everyone,

I seem to have run into another problem... perhaps I'm just a bit slow.

The problem is something like this:
I have a popup window launched by a page sourced in an iFrame [master.html |
slave.html -> child_popup.html] and would like to find a method to close all
windows (popups) when the master window is closed. I have found a fair
amount of documentation on this fairly straightforward process however, it
would seem that the inclusion of iFrames screws with the settings somewhere
along the line.

How do would I make it so the "master" is aware of the "slave's" "children"?
Oh, to add insult to injury, index.html is also a static frameset (top nav,
bottom content) - though I don't think this should really effect anything so
long as the onUnload="childwindow.close()" lives in <frameset>
Basically, I know how to do it, just not how to get everyone talking to
eachother in a successful manner.

Any help would be greatly appreciated!

Thanks in advance!

|veganeater|


If someone were to close the parent then there is no reliable way to
'trap' that close and fire it at all popups.

What you could do however is have the children read a value from the
parent every few seconds - If it cannot read the value, then assume the
parent has died, thus kill the children.

Perhaps someone else though has an alternative idea... I think there is
a way to reference the parent window and check for a true/false which
might help too...

does this help steer you forward?

randelld
Jul 23 '05 #2
"Randell D." <re******************************@fiprojects.moc > wrote in
message news:LNmLd.229865$6l.108687@pd7tw2no...
veganeater wrote:
Hello again everyone,

I seem to have run into another problem... perhaps I'm just a bit slow.

The problem is something like this:
I have a popup window launched by a page sourced in an iFrame [master.html | slave.html -> child_popup.html] and would like to find a method to close all windows (popups) when the master window is closed. I have found a fair
amount of documentation on this fairly straightforward process however, it would seem that the inclusion of iFrames screws with the settings somewhere along the line.

How do would I make it so the "master" is aware of the "slave's" "children"? Oh, to add insult to injury, index.html is also a static frameset (top nav, bottom content) - though I don't think this should really effect anything so long as the onUnload="childwindow.close()" lives in <frameset>
Basically, I know how to do it, just not how to get everyone talking to
eachother in a successful manner.

Any help would be greatly appreciated!

Thanks in advance!

|veganeater|


If someone were to close the parent then there is no reliable way to
'trap' that close and fire it at all popups.

What you could do however is have the children read a value from the
parent every few seconds - If it cannot read the value, then assume the
parent has died, thus kill the children.

Perhaps someone else though has an alternative idea... I think there is
a way to reference the parent window and check for a true/false which
might help too...

does this help steer you forward?

randelld


Thanks Randelld,

Your words are insightful however, I have made use of the onUnload command
to pass instruction to the children in the past. The point of contention in
this issue is that the pages doing the calling of the children are being
displayed in an iframe (not just an ordinary one either, a dynamically
resized one based on the content being displayed). What I need is to find a
way to pass the onUnLoad function to the pages in the iframe and thus to the
popup/child itself.

Are frames independent or are they children processes aswell?

Again, thanks for your help, it is certainly very interesting and I will
keep it in mind.

|veganeater|
Jul 23 '05 #3

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

Similar topics

6
by: Bob Swerdlow | last post by:
My application starts up a number of processes for various purposes using: self.popen = popen2.Popen3("/usr/local/bin/python -O "myscript.py") and then shuts them down when appropriate with...
1
by: H2 | last post by:
Hi all, Any one know how to open a new windows in a child window using javascript? What I need to do is that, in my main page, there is a button, onclick, it opens one child windows. In the child...
3
by: pattanawadee | last post by:
Deall All, Could anybody suggestion me How to kill all inherrit processes (sibling child,previous and parent process) in the case I know only child process id and user id, For example I strart...
1
by: Alexander N. Spitzer | last post by:
I am trying to write a program that will fork a process, and execute the given task... the catch is that if it runs too long, I want to clean it up. this seemed pretty straight forward with a...
4
by: Bonj | last post by:
Further to my last post, I have managed to get a child window to display. But its messages are routed to the same WNDPROC that the main window's messages are routed to - what is the way of...
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
4
by: Steve Barnett | last post by:
I've created a simple MDI application and have designated the Window menu to keep track of the mdi children. When I first load an mdi child, it's caption consists of "File: no file loaded" and this...
10
by: I. Myself | last post by:
Suppose we spawn a child process with Popen. I'm thinking of an executable file, like a compiled C program. Suppose it is supposed to run for one minute, but it just keeps going and going. Does...
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: 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
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
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,...
0
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...

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.