469,926 Members | 1,492 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,926 developers. It's quick & easy.

How to close all the child windows when parent window get closed?

zEE
How to close all the child windows when parent window get closed? in
ASP.net application
through scripting..

Apr 25 '06 #1
1 2008
Simply When you open new windows assing it to variables.
<script language=javascript type=text/javascript>
var win1;
var win2;
var win3;
function openNewWindow()
{
win1 = window.open("page1.aspx");
win2 = window.open("page1.aspx");
}
function CloseChildren()
{
win1.close();
...........
}

then in body onunload event call CloseChildren()

Note: each new window must assign to diffrent variable then check them all
if not null (NaN) They close it..

"zEE" <ha*********@gmail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
How to close all the child windows when parent window get closed? in
ASP.net application
through scripting..

Apr 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by CST | last post: by
4 posts views Thread by Colin Graham | last post: by
3 posts views Thread by Isabel | last post: by
5 posts views Thread by Stan Sainte-Rose | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.