By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,549 Members | 1,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,549 IT Pros & Developers. It's quick & easy.

Closing Child window from parent window

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.