Kill Child window problem

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

    Kill Child window problem

    Hello again everyone,

    I seem to have run into another problem... perhaps I'm just a bit slow.

    The problem is something like this:
    I have a popup window launched by a page sourced in an iFrame [master.html |
    slave.html -> child_popup.htm l] and would like to find a method to close all
    windows (popups) when the master window is closed. I have found a fair
    amount of documentation on this fairly straightforward process however, it
    would seem that the inclusion of iFrames screws with the settings somewhere
    along the line.

    How do would I make it so the "master" is aware of the "slave's" "children"?
    Oh, to add insult to injury, index.html is also a static frameset (top nav,
    bottom content) - though I don't think this should really effect anything so
    long as the onUnload="child window.close()" lives in <frameset>


    Basically, I know how to do it, just not how to get everyone talking to
    eachother in a successful manner.

    Any help would be greatly appreciated!

    Thanks in advance!

    |veganeater|


  • Randell D.

    #2
    Re: Kill Child window problem

    veganeater wrote:[color=blue]
    > Hello again everyone,
    >
    > I seem to have run into another problem... perhaps I'm just a bit slow.
    >
    > The problem is something like this:
    > I have a popup window launched by a page sourced in an iFrame [master.html |
    > slave.html -> child_popup.htm l] and would like to find a method to close all
    > windows (popups) when the master window is closed. I have found a fair
    > amount of documentation on this fairly straightforward process however, it
    > would seem that the inclusion of iFrames screws with the settings somewhere
    > along the line.
    >
    > How do would I make it so the "master" is aware of the "slave's" "children"?
    > Oh, to add insult to injury, index.html is also a static frameset (top nav,
    > bottom content) - though I don't think this should really effect anything so
    > long as the onUnload="child window.close()" lives in <frameset>
    >
    >
    > Basically, I know how to do it, just not how to get everyone talking to
    > eachother in a successful manner.
    >
    > Any help would be greatly appreciated!
    >
    > Thanks in advance!
    >
    > |veganeater|
    >
    >[/color]

    If someone were to close the parent then there is no reliable way to
    'trap' that close and fire it at all popups.

    What you could do however is have the children read a value from the
    parent every few seconds - If it cannot read the value, then assume the
    parent has died, thus kill the children.

    Perhaps someone else though has an alternative idea... I think there is
    a way to reference the parent window and check for a true/false which
    might help too...

    does this help steer you forward?

    randelld

    Comment

    • veganeater

      #3
      Re: Kill Child window problem

      "Randell D." <reply.via.news .group.only.tha nks@fiprojects. moc> wrote in
      message news:LNmLd.2298 65$6l.108687@pd 7tw2no...[color=blue]
      > veganeater wrote:[color=green]
      > > Hello again everyone,
      > >
      > > I seem to have run into another problem... perhaps I'm just a bit slow.
      > >
      > > The problem is something like this:
      > > I have a popup window launched by a page sourced in an iFrame[/color][/color]
      [master.html |[color=blue][color=green]
      > > slave.html -> child_popup.htm l] and would like to find a method to close[/color][/color]
      all[color=blue][color=green]
      > > windows (popups) when the master window is closed. I have found a fair
      > > amount of documentation on this fairly straightforward process however,[/color][/color]
      it[color=blue][color=green]
      > > would seem that the inclusion of iFrames screws with the settings[/color][/color]
      somewhere[color=blue][color=green]
      > > along the line.
      > >
      > > How do would I make it so the "master" is aware of the "slave's"[/color][/color]
      "children"?[color=blue][color=green]
      > > Oh, to add insult to injury, index.html is also a static frameset (top[/color][/color]
      nav,[color=blue][color=green]
      > > bottom content) - though I don't think this should really effect[/color][/color]
      anything so[color=blue][color=green]
      > > long as the onUnload="child window.close()" lives in <frameset>
      > >
      > >
      > > Basically, I know how to do it, just not how to get everyone talking to
      > > eachother in a successful manner.
      > >
      > > Any help would be greatly appreciated!
      > >
      > > Thanks in advance!
      > >
      > > |veganeater|
      > >
      > >[/color]
      >
      > If someone were to close the parent then there is no reliable way to
      > 'trap' that close and fire it at all popups.
      >
      > What you could do however is have the children read a value from the
      > parent every few seconds - If it cannot read the value, then assume the
      > parent has died, thus kill the children.
      >
      > Perhaps someone else though has an alternative idea... I think there is
      > a way to reference the parent window and check for a true/false which
      > might help too...
      >
      > does this help steer you forward?
      >
      > randelld[/color]

      Thanks Randelld,

      Your words are insightful however, I have made use of the onUnload command
      to pass instruction to the children in the past. The point of contention in
      this issue is that the pages doing the calling of the children are being
      displayed in an iframe (not just an ordinary one either, a dynamically
      resized one based on the content being displayed). What I need is to find a
      way to pass the onUnLoad function to the pages in the iframe and thus to the
      popup/child itself.

      Are frames independent or are they children processes aswell?

      Again, thanks for your help, it is certainly very interesting and I will
      keep it in mind.

      |veganeater|


      Comment

      Working...