parent window know when a child window is closed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kiki

    parent window know when a child window is closed

    Hello,
    i wonder if anyone can help..
    Is there a way of knowing from the parent window (var window;) that
    the child window (var newWindow) has been closed? i can't touch the
    child window's closed as this will be populated and managed by a
    client.. i need to know when this will be closed though to reload the
    parent window..

    thanks
  • Thomas 'PointedEars' Lahn

    #2
    Re: parent window know when a child window is closed

    Kiki wrote:[color=blue]
    > Is there a way of knowing from the parent window (var window;) that
    > the child window (var newWindow) has been closed? [...][/color]

    <http://groups.google.c om/groups?as_q=win dow+closed&as_u group=comp.lang .javascript&sco ring=d&filter=0 >

    Comment

    • Harag

      #3
      Re: parent window know when a child window is closed

      On 28 Jul 2004 03:48:47 -0700, kiki@dyky.co.uk (Kiki) wrote:
      [color=blue]
      >Hello,
      >i wonder if anyone can help..
      >Is there a way of knowing from the parent window (var window;) that
      >the child window (var newWindow) has been closed? i can't touch the
      >child window's closed as this will be populated and managed by a
      >client.. i need to know when this will be closed though to reload the
      >parent window..
      >
      >thanks[/color]


      use the .closed property.

      A read-only boolean value that specifies whether the window has been
      closed. When a browser window closes, the Window object that
      represents it does not simply disappear. The Window object continues
      to exists, but its "closed" property is set to true. (source:
      Javascript: The Difinitive guide pg 653)


      eg
      if (newWindow.clos ed) {
      alert('The Popup window no longer exists');
      }


      HTH

      Al.

      Comment

      • kiki christie

        #4
        Re: parent window know when a child window is closed


        thank you for your reply Harag.. if i do it the way you suggested then i
        will have to put a timer that will check every so often if the child
        window has been closed..
        I was just wondering if there was a better way of doing this..

        thanks again..


        *** Sent via Developersdex http://www.developersdex.com ***
        Don't just participate in USENET...get rewarded for it!

        Comment

        Working...