473,394 Members | 1,845 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,394 software developers and data experts.

Closing Child window from parent window

Hi all,
Iam using mozilla firebird.
I have three popups displayed at one point of time...if I close one
the other two goes hidden....could you please suggest me the reason
for this behaviour and how to overcome it.....

While I opened......these child windows(popup)...from the main window
I have given "dependent=yes" in the window.open statement.

The sameway I want to close the Child windows opened from the parent
window using IE. I use IE 6.0.

All your suggestions are welcome.
TIA.
Regards
Gokul
Jul 20 '05 #1
2 24739
How are you creating these windows?
win1 = window.open(...)
win2 = window.open(...)
win3 = window.open(...)

Then you close say one as: win2.close() ?

Don't know about the 'dependent' flag, try removing and see too.

Regards,
Elias
"gokul" <go********@yahoo.com> wrote in message
news:c1**************************@posting.google.c om...
Hi all,
Iam using mozilla firebird.
I have three popups displayed at one point of time...if I close one
the other two goes hidden....could you please suggest me the reason
for this behaviour and how to overcome it.....

While I opened......these child windows(popup)...from the main window
I have given "dependent=yes" in the window.open statement.

The sameway I want to close the Child windows opened from the parent
window using IE. I use IE 6.0.

All your suggestions are welcome.
TIA.
Regards
Gokul

Jul 20 '05 #2
gokul wrote:
Dear Lallous,
Thank you for the Suggestion.But Iam unable to get the job done.
because its unable to find the object.
This is how I use the method in my parent window to create popup.
<a href="#" onclick="javascript:popup('http:\\localhost')">Ope n
javascript: is not required here, and you should probably be returning false to the event handler to
ensure the HREF is not followed:

<a href="#" onclick="popup('http:\\localhost');return false;">Open
Window</a>
as shown above from 2 to 3 pages I open these popups....
I use a js file by name popup.js which has the code:
function popup(sUrl)
{
popWin= window.open(sUrl, 'taxp_WFaq',
'dependent=yes,height=340,width=550,left=160,top=1 30, scrollbars=yes,
resizable=yes');
popWin.unload="javascript:WinMaximize()";
This is not how you dynamically set an event, and even if it were, there is no "unload" event associated
with the window object. Perhaps what you are trying to do is:

popWin.onunload = function() { WinMaximize(); }

Of course, WinMaximize() has to be defined on the page you are opening, or this will not work. If
WinMaximize() is defined on the page you are opening *from*, then:

popWin.onunload = function() { if (opener && opener.WinMaximize) WinMaximize(); }

may work. Untested.
popWin.focus();
childVal = popWin ;
return;
return is unnecessary here, the function will return on it's own.
}

The above is the exact scenario.

TIA,
Gokul Raja Dhamodaran.


--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
* http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
* http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #3

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

Similar topics

10
by: Tom Szabo | last post by:
Is there an event when that triggers when the window is closing.... I am talking about when the user clicks on the cross on the right top corner of the window!!!
5
by: Ron L | last post by:
I have an MDI application with a number of child windows. In each child window I am catching the Closing event and having the child window decide if it should set cancel to true. The intent here...
1
by: Chris Bruce | last post by:
In my application I need a way to distiguish between the following events: 1. When a user closes an MDI child window. 2. When the user closes the MDI parent window which subsequently closes the...
4
by: Sileesh | last post by:
Hi I have a btn in Parent.aspx page . On server_click() of the Btn, i am opening a new window called the child.apsx window. Child window also have a Btn. On serverClick of this Btn, I perform...
10
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...
1
by: jd | last post by:
Hi guys, I'm trying to create an HTML page that contains two frames. The bottom frame should simply be some website, but the top frame needs to have a close link to kill the window. I tried calling...
2
by: javanet | last post by:
Hi all, 1) i opened a parent window. 2) then i opend a child window thruogh this parent window. Now i want to close child window before closing the parend window means my clients can not be...
19
by: zacks | last post by:
I have a .NET 2.0 MDI application where the child form has a Tab Control. Each of the Tab in the Tab Control has a Validating event to handle what it should do when the user changes tabs. But...
4
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 &&...
5
by: Nithu25 | last post by:
Hi All, I have a parent window where i have three links. On clicking those links, new window will be opened as a pop up. When i logout from the parent window, the child windows should be closed....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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.