window handle state {...}

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

    #1

    window handle state {...}

    I have a parent/child relationship between two windows. The parent
    spawns the child using something like this.

    windowHandle = window.open("ch ild.aspx","chil d");

    the problem is that if the child window closes then the windowHandle
    object is left in an orphaned state. It does't equate to null and I'm
    not sure how to check and see if the window still exists. The child
    does notify the parent window through the window.opener object when it
    closes but this does not work in EVERY case.

    I'm looking for something like "if isnothing(windo wHandle)"

    thanks
    will

  • VK

    #2
    Re: window handle state {...}

    In your child.aspx :
    <body onUnload="self. opener='null';"

    Would be nice to have self-updating window-refs, but it would possibly
    compromise the unter-domain security.


    Comment

    • Will Wirtz

      #3
      Re: window handle state {...}


      VK,

      Thanks for the quick response. I am currently performing some similar
      code in the onload event but the problem is that if the child page
      reloads because of an autopost back of a drop down control then the
      onunload event fires and I don't want to seperate the parent and the
      child at that point, only when the child window closes. This is the
      problem I'm trying to work around. I just wish there was an event that
      signals the window closing and not just unload the html.


      will


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

      Comment

      • Grant Wagner

        #4
        Re: window handle state {...}

        "Will" <WillCWirtz@Yah oo.com> wrote in message
        news:1103132194 .063385.131230@ f14g2000cwb.goo glegroups.com.. .[color=blue]
        > I have a parent/child relationship between two windows. The parent
        > spawns the child using something like this.
        >
        > windowHandle = window.open("ch ild.aspx","chil d");
        >
        > the problem is that if the child window closes then the windowHandle
        > object is left in an orphaned state. It does't equate to null and I'm
        > not sure how to check and see if the window still exists. The child
        > does notify the parent window through the window.opener object when it
        > closes but this does not work in EVERY case.
        >
        > I'm looking for something like "if isnothing(windo wHandle)"[/color]

        <url: http://jibbering.com/faq/#FAQ4_10 />

        windowHandle is not in an "orphaned" state. It's -closed- property is
        set to true. You can test for that.

        --
        Grant Wagner <gwagner@agrico reunited.com>
        comp.lang.javas cript FAQ - http://jibbering.com/faq


        Comment

        Working...