close all child windows when close the main window

Discussion in 'Javascript' started by jrefactors@hotmail.com, Jan 15, 2005.

  1. Guest

    >From the main page, there are lots of links to open new window.
    i.e. <a href="#" onClick="window.open('child1.html')">Open Child
    Window</a>

    If I close the main page, I want to close all child windows also. That
    means I
    need to keep track all handles of the child windows whenever I open a
    new
    window. Correct? any suggestions on the approach?
    Please advise. thanks!!
     
    , Jan 15, 2005
    #1
    1. Advertising

  2. Chung Leong Guest

    [OT] Re: close all child windows when close the main window

    <> wrote in message
    news:...
    > >From the main page, there are lots of links to open new window.

    > i.e. <a href="#" onClick="window.open('child1.html')">Open Child
    > Window</a>
    >
    > If I close the main page, I want to close all child windows also. That
    > means I
    > need to keep track all handles of the child windows whenever I open a
    > new
    > window. Correct? any suggestions on the approach?
    > Please advise. thanks!!
    >


    Yes. Wouldn't be hard if you define a Javascript function for opening
    windows and save the handles into an array.

    Or you could use the ShowModelessDialog() function. Modless dialog boxes
    stay in front of their parent window and automatically would close when the
    parent closes.
     
    Chung Leong, Jan 16, 2005
    #2
    1. Advertising

  3. Randy Webb Guest

    Re: [OT] Re: close all child windows when close the main window

    Chung Leong wrote:
    > <> wrote in message
    > news:...
    >
    >>>From the main page, there are lots of links to open new window.

    >>i.e. <a href="#" onClick="window.open('child1.html')">Open Child
    >>Window</a>
    >>
    >>If I close the main page, I want to close all child windows also. That
    >>means I
    >>need to keep track all handles of the child windows whenever I open a
    >>new
    >>window. Correct? any suggestions on the approach?
    >>Please advise. thanks!!
    >>

    >
    >
    > Yes. Wouldn't be hard if you define a Javascript function for opening
    > windows and save the handles into an array.
    >
    > Or you could use the ShowModelessDialog() function. Modless dialog boxes
    > stay in front of their parent window and automatically would close when the
    > parent closes.


    Modeless Dialogs are also IE-only.

    I might be able to understand the OT if this were not posted to
    comp.lang.javascript


    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq
     
    Randy Webb, Jan 16, 2005
    #3
  4. Chung Leong Guest

    Re: [OT] Re: close all child windows when close the main window

    "Randy Webb" <> wrote in message
    news:...
    > Chung Leong wrote:
    > > <> wrote in message
    > > news:...
    > >
    > >>>From the main page, there are lots of links to open new window.
    > >>i.e. <a href="#" onClick="window.open('child1.html')">Open Child
    > >>Window</a>
    > >>
    > >>If I close the main page, I want to close all child windows also. That
    > >>means I
    > >>need to keep track all handles of the child windows whenever I open a
    > >>new
    > >>window. Correct? any suggestions on the approach?
    > >>Please advise. thanks!!
    > >>

    > >
    > >
    > > Yes. Wouldn't be hard if you define a Javascript function for opening
    > > windows and save the handles into an array.
    > >
    > > Or you could use the ShowModelessDialog() function. Modless dialog boxes
    > > stay in front of their parent window and automatically would close when

    the
    > > parent closes.

    >
    > Modeless Dialogs are also IE-only.
    >
    > I might be able to understand the OT if this were not posted to
    > comp.lang.javascript


    Oops. Why did the OP cross post into comp.lang.php?
     
    Chung Leong, Jan 16, 2005
    #4
    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. zEE
    Replies:
    1
    Views:
    6,143
    Islamegy®
    Apr 25, 2006
  2. Replies:
    6
    Views:
    8,841
    sateeshranga
    Aug 7, 2008
  3. Jeff Rodriguez
    Replies:
    23
    Views:
    1,132
    David Schwartz
    Dec 9, 2003
  4. Replies:
    1
    Views:
    249
  5. Jaggu
    Replies:
    7
    Views:
    223
    Thomas 'PointedEars' Lahn
    May 22, 2006
Loading...

Share This Page