Re: <body onload="self.close();"> won't work on Firefox 1.0.7?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: <body onload="self.close();"> won't work on Firefox 1.0.7?

From: Martin Honnen <mahotrash@yahoo.de>
Date: Thu Jan 19 2006 - 20:03:51 CET

stevong wrote:

> I've also tried to create a function. It doesnt work on Firefox also.
> Bottomline is: Firefox doesn't accept window.close() or self.close()?

It depends on the browser settings whether script is allowed to do
certain things like closing windows. Usually script can only close a
window that has been opened by script (window.open) but Mozilla probably
can be configured to completely disallow script to close windows.

Firefox 1.5 gives a message
   "Scripts may not close windows that were not opened by script."
in the JavaScript console if window.close() fails on a window that has
not been opened by script. I think Firefox 1.0.x does the same but can't
check currently.

-- 
	Martin Honnen
	http://JavaScript.FAQTs.com/
Received on Tue Feb 7 21:14:11 2006