Safari (Mac) close()

Discussion in 'HTML' started by Marcia Gulesian, Aug 13, 2004.

  1. The following code works in I.E. (PC) but not Safari (Mac)

    window.opener=self;
    window.close();

    What code will close the page when it runs in Safari?
    Marcia Gulesian, Aug 13, 2004
    #1
    1. Advertising

  2. Marcia Gulesian

    Neal Guest

    On Fri, 13 Aug 2004 14:43:37 -0400, Marcia Gulesian <>
    wrote:

    >
    >
    > The following code works in I.E. (PC) but not Safari (Mac)
    >
    > window.opener=self;
    > window.close();
    >
    > What code will close the page when it runs in Safari?
    >



    Why do you want to close my browser? It's mine, not yours.
    Neal, Aug 13, 2004
    #2
    1. Advertising

  3. Marcia Gulesian

    Toby Inkster Guest

    Marcia Gulesian wrote:

    > The following code works in I.E. (PC) but not Safari (Mac)
    > window.opener=self;
    > window.close();


    That's because it takes advantage of a security hole in IE which doesn't
    exist in various other browsers.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Aug 13, 2004
    #3
  4. This code is in a function that is called when the user (you) clicks on a
    link.

    Neal wrote:

    > On Fri, 13 Aug 2004 14:43:37 -0400, Marcia Gulesian <>
    > wrote:
    >
    > >
    > >
    > > The following code works in I.E. (PC) but not Safari (Mac)
    > >
    > > window.opener=self;
    > > window.close();
    > >
    > > What code will close the page when it runs in Safari?
    > >

    >
    > Why do you want to close my browser? It's mine, not yours.
    Marcia Gulesian, Aug 13, 2004
    #4
  5. Marcia Gulesian wrote:
    > The following code works in I.E. (PC) but not Safari (Mac)
    >
    > window.opener=self;
    > window.close();


    or Opera, Mozilla, Firefox, or any browser which is not IE.

    Its generally considered to be a security flaw.

    > What code will close the page when it runs in Safari?


    None. You can only close windows if they were opened with JavaScript.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 13, 2004
    #5
  6. Marcia Gulesian wrote:

    Please direct your attention towards
    http://www.allmyfaqs.com/faq.pl?How_to_post

    >> Why do you want to close my browser? It's mine, not yours.


    > This code is in a function that is called when the user (you) clicks on a
    > link.


    You might as well get rid of it, most browsers provide half a dozen ways to
    close windows already.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 13, 2004
    #6
  7. Marcia Gulesian

    Neal Guest

    On Fri, 13 Aug 2004 14:51:54 -0400, Marcia Gulesian <>
    wrote:

    > Neal wrote:
    >
    >> On Fri, 13 Aug 2004 14:43:37 -0400, Marcia Gulesian <>
    >> wrote:
    >>
    >> >
    >> >
    >> > The following code works in I.E. (PC) but not Safari (Mac)
    >> >
    >> > window.opener=self;
    >> > window.close();
    >> >
    >> > What code will close the page when it runs in Safari?
    >> >

    >>
    >> Why do you want to close my browser? It's mine, not yours.

    >
    > This code is in a function that is called when the user (you) clicks on a
    > link.


    Fixed the order of responses.

    I have a little X in the top right. What more do I need? Your user already
    knows how to do that.
    Neal, Aug 13, 2004
    #7
  8. Marcia Gulesian

    Sam Hughes Guest

    Marcia Gulesian <> wrote in
    news::

    > This code is in a function that is called when the user (you) clicks
    > on a link.


    While it's nice to try to be user-friendly by offering and telling them
    explicitly how to close the browser window, wouldn't doing this confuse
    them? I am sure they already know how to do this, using their ordinary
    user-interface features, and you might get them wondering if there is a
    *reason* for you offering this alternate method.

    --
    How to make it so visitors can't resize your fonts:
    <http://www.rpi.edu/~hughes/www/wise_guy/unresizable_text.html>
    Sam Hughes, Aug 13, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gabe garza

    Safari and Firefox on MAC OS X

    gabe garza, Mar 28, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    511
    gabe garza
    Mar 29, 2005
  2. =?Utf-8?B?U2FtMjAwMA==?=

    Can Mac Users With safari browser see the site with ASP.net

    =?Utf-8?B?U2FtMjAwMA==?=, Jul 22, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,612
    Juan T. Llibre
    Jul 22, 2005
  3. Stijn Goris
    Replies:
    2
    Views:
    1,031
    Jim Royal
    Feb 16, 2004
  4. cpprogrammer
    Replies:
    0
    Views:
    552
    cpprogrammer
    May 11, 2006
  5. Iñaki Baz Castillo
    Replies:
    7
    Views:
    839
    Iñaki Baz Castillo
    Jan 12, 2010
Loading...

Share This Page