Closing Child window from parent window

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

    #1

    Closing Child window from parent window

    Hi all,
    Iam using mozilla firebird.
    I have three popups displayed at one point of time...if I close one
    the other two goes hidden....could you please suggest me the reason
    for this behaviour and how to overcome it.....

    While I opened......the se child windows(popup). ..from the main window
    I have given "dependent= yes" in the window.open statement.

    The sameway I want to close the Child windows opened from the parent
    window using IE. I use IE 6.0.

    All your suggestions are welcome.
    TIA.
    Regards
    Gokul
  • lallous

    #2
    Re: Closing Child window from parent window

    How are you creating these windows?
    win1 = window.open(... )
    win2 = window.open(... )
    win3 = window.open(... )

    Then you close say one as: win2.close() ?

    Don't know about the 'dependent' flag, try removing and see too.

    Regards,
    Elias
    "gokul" <gokulrajad@yah oo.com> wrote in message
    news:c1f374f7.0 311270547.2142e ae4@posting.goo gle.com...[color=blue]
    > Hi all,
    > Iam using mozilla firebird.
    > I have three popups displayed at one point of time...if I close one
    > the other two goes hidden....could you please suggest me the reason
    > for this behaviour and how to overcome it.....
    >
    > While I opened......the se child windows(popup). ..from the main window
    > I have given "dependent= yes" in the window.open statement.
    >
    > The sameway I want to close the Child windows opened from the parent
    > window using IE. I use IE 6.0.
    >
    > All your suggestions are welcome.
    > TIA.
    > Regards
    > Gokul[/color]


    Comment

    • Grant Wagner

      #3
      Re: Closing Child window from parent window

      gokul wrote:
      [color=blue]
      > Dear Lallous,
      > Thank you for the Suggestion.But Iam unable to get the job done.
      > because its unable to find the object.
      > This is how I use the method in my parent window to create popup.
      > <a href="#" onclick="javasc ript:popup('htt p:\\localhost') ">Open[/color]

      javascript: is not required here, and you should probably be returning false to the event handler to
      ensure the HREF is not followed:

      <a href="#" onclick="popup( 'http:\\localho st');return false;">Open
      [color=blue]
      > Window</a>
      > as shown above from 2 to 3 pages I open these popups....
      > I use a js file by name popup.js which has the code:
      > function popup(sUrl)
      > {
      > popWin= window.open(sUr l, 'taxp_WFaq',
      > 'dependent=yes, height=340,widt h=550,left=160, top=130, scrollbars=yes,
      > resizable=yes') ;
      > popWin.unload=" javascript:WinM aximize()";[/color]

      This is not how you dynamically set an event, and even if it were, there is no "unload" event associated
      with the window object. Perhaps what you are trying to do is:

      popWin.onunload = function() { WinMaximize(); }

      Of course, WinMaximize() has to be defined on the page you are opening, or this will not work. If
      WinMaximize() is defined on the page you are opening *from*, then:

      popWin.onunload = function() { if (opener && opener.WinMaxim ize) WinMaximize(); }

      may work. Untested.
      [color=blue]
      > popWin.focus();
      > childVal = popWin ;
      > return;[/color]

      return is unnecessary here, the function will return on it's own.
      [color=blue]
      > }
      >
      > The above is the exact scenario.
      >
      > TIA,
      > Gokul Raja Dhamodaran.[/color]

      --
      | Grant Wagner <gwagner@agrico reunited.com>

      * Client-side Javascript and Netscape 4 DOM Reference available at:
      * http://devedge.netscape.com/library/...ce/frames.html
      * Internet Explorer DOM Reference available at:
      * http://msdn.microsoft.com/workshop/a...ence_entry.asp
      * Netscape 6/7 DOM Reference available at:
      * http://www.mozilla.org/docs/dom/domref/
      * Tips for upgrading JavaScript for Netscape 7 / Mozilla
      * http://www.mozilla.org/docs/web-deve...upgrade_2.html


      Comment

      Working...