closing brower windows

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

    closing brower windows

    hi,

    I'm trying to close a browser window, from a window that has been
    opened using the window.open method.
    I've tried amongst others:
    opener.close()
    <windowname>.cl ose()
    top.close()
    top.opener.clos e()


    ....but that ¤%// window just won't die!

    any ideas?

    obscurr
  • Martin Honnen

    #2
    Re: closing brower windows



    Obscurr wrote:
    [color=blue]
    > hi,
    >
    > I'm trying to close a browser window, from a window that has been
    > opened using the window.open method.[/color]

    You can try
    if (opener && !opener.closed) {
    opener.opener = opener;
    opener.close();
    }
    that should close the window with IE/Win and with Netscape 6 and 7.
    Netscape 7.1 doesn't allow script to close a window that has not been
    opened by script, and Netscape 4 will ask the user whether he wants to
    allow the script to close the window.
    [color=blue]
    > ...but that ¤%// window just won't die!
    >
    > any ideas?
    >
    > obscurr[/color]

    --

    Martin Honnen


    Comment

    Working...