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

Discussion in 'ASP .Net' started by zEE, Apr 25, 2006.

  1. zEE

    zEE Guest

    How to close all the child windows when parent window get closed? in
    ASP.net application
    through scripting..
     
    zEE, Apr 25, 2006
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > How to close all the child windows when parent window get closed? in
    > ASP.net application
    > through scripting..
    >
     
    Islamegy®, Apr 25, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGF1bA==?=

    close child form when parent form is closed.

    =?Utf-8?B?UGF1bA==?=, Nov 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    965
    Lau Lei Cheong
    Nov 24, 2004
  2. Replies:
    6
    Views:
    8,881
    sateeshranga
    Aug 7, 2008
  3. Kiki
    Replies:
    3
    Views:
    182
    kiki christie
    Jul 28, 2004
  4. gopal srinivasan
    Replies:
    0
    Views:
    247
    gopal srinivasan
    Nov 5, 2004
  5. Replies:
    3
    Views:
    427
    Chung Leong
    Jan 16, 2005
Loading...

Share This Page