[Javascript] Closing browser window without user confirmation

Reuben D Budiardja reubendb at goshen.edu
Sat Aug 11 16:57:27 CDT 2001


Hi
I'm doing a server scripting (php) combined with client side scripting 
(javascript). I have a file that is included by all of my application. This 
file do authentication, password, etc using server-side scripting.

Basically, I want to be able to close client window in some instances. Eg, if 
it is un-authorize access, when I do some debugging, etc. But when I put this 
line in the file

this.close();

The browser always display a pop up asking user confirmation to close window 
(with cancel and yes). Thus, if the user say "cancel", the browser window is 
not closed. Can I avoid this? I mean, can I force it to just close the 
browser window, whatever the user respond is? 

Thanks.
Reuben D. Budiardja



More information about the Javascript mailing list