[thelist] Javascript:self.close() w/out Warning

Peter-Paul Koch gassinaumasis at hotmail.com
Thu Jan 30 09:25:00 CST 2003


>Does this work in all browsers?
>
>I think I remember reading somewhere that this was an IE only thing...I
>could be wrong.  Anyone know?

Mostly IE Windows, yes. See
http://www.xs4all.nl/~ppk/js/index.html?croswin.html#closingopener for a
complete explanation.


>have a window that isn't created with javascript that you want to close and
>you don't wanna have the user see that annoying dialog?  well, it's as
>simple as assigning the current window object to the opener property of the
>window.  then you can close it with no dialog.
>
><script language="JavaScript" type="text/javascript">
><!--
>   window.opener = self;
>   window.close();
>// -->
></script>

--------------------------------------------------
ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
http://www.xs4all.nl/~ppk/
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
W3C DOM Compatibility Table, expanded & updated
http://www.xs4all.nl/~ppk/js/index.html?version5.html
--------------------------------------------------


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail




More information about the thelist mailing list