Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Safari (Mac) close()

Reply
Thread Tools

Safari (Mac) close()

 
 
Marcia Gulesian
Guest
Posts: n/a
 
      08-13-2004


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?

 
Reply With Quote
 
 
 
 
Neal
Guest
Posts: n/a
 
      08-13-2004
On Fri, 13 Aug 2004 14:43:37 -0400, Marcia Gulesian <(E-Mail Removed)>
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.
 
Reply With Quote
 
 
 
 
Toby Inkster
Guest
Posts: n/a
 
      08-13-2004
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

 
Reply With Quote
 
Marcia Gulesian
Guest
Posts: n/a
 
      08-13-2004
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 <(E-Mail Removed)>
> 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.


 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      08-13-2004
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
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      08-13-2004
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
 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      08-13-2004
On Fri, 13 Aug 2004 14:51:54 -0400, Marcia Gulesian <(E-Mail Removed)>
wrote:

> Neal wrote:
>
>> On Fri, 13 Aug 2004 14:43:37 -0400, Marcia Gulesian <(E-Mail Removed)>
>> 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.
 
Reply With Quote
 
Sam Hughes
Guest
Posts: n/a
 
      08-13-2004
Marcia Gulesian <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> 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>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Safari and Firefox on MAC OS X gabe garza ASP .Net 2 03-29-2005 12:12 AM
Safari Postback Problems WizyDig ASP .Net 2 12-02-2004 06:03 PM
PostBack doesn't fire the first time with Safari 1.2.1 Ian Cox ASP .Net 2 06-23-2004 09:52 AM
Safari Browser compatible with dotnet Hemlata Shah ASP .Net 2 03-04-2004 04:39 AM
Safari Display Problem Jane Hawkins ASP .Net 1 12-23-2003 03:09 PM



Advertisments