[thelist] close window js

Richard Bennett mail at richardinfo.com
Fri Jun 1 10:20:30 CDT 2001


"window" is the current window object, "self" refers to the current window
object, so they are the same thing, there could be a difference if you
wanted to close a window you had previously opened, then you would refer to
the handle you had assigned to that window, "myWindow.close()" for instance.
There's a good article on the mainpage concerning  "return false".

Cheers,
Richard Bennett

mail at richardinfo.com
www.richardinfo.com

Richard Bennett
Independent Software Consultant
Leemputstraat 41
2600 Berchem, Belgium
Phone: + 32(0)475 71 91 84




----- Original Message -----
From: "sfmalo" <sfmalo at email.msn.com>
To: <thelist at lists.evolt.org>
Sent: 01 June, 2001 16:59
Subject: [thelist] close window js


> Recently on another list, someone asked for a close window javascript.
Here
> are two answers that came back. Could someone tell me if both are correct?
> Do they both accomplish the same thing?
>
> <.a href="javascript:void" onclick='window.close()'>Close Window</a>
>
> <.A HREF="javascript:void(" ")" ONCLICK="self.close();return false;">
Close
> Window</A>
>
> Sharon
> --------------------------------------------------------------------------
-
> Sharon F. Malone
> "web design and Internet writing services"
> http://www.24caratdesign.com
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list