[thelist] Close browser

Ron_Senykoff at BEAEROSPACE.COM Ron_Senykoff at BEAEROSPACE.COM
Mon Oct 1 09:46:30 CDT 2001


<snip author="Liz">
Hi all,
    Client just asked me to put in a button to quit the browser...IE 4.0 as
a matter a fact at the end of  an interactive program I created for them.
Quit the browser...

Is this even possible?

Somedays, clients are indeed from hell
</snip>

You can call window.close(), but they will be prompted.  Basically, if they
launch the window then they have to authorize closing it.  If you create
the window (i.e. JavaScript opens a new browser window) then you can close
it with JavaScript and they won't be prompted.  It's a security thing that
keeps web pages from messing around with each other.

You can make a button like this:

<input type="Button" value="Close Window" onClick="window.close()">

-Ron





More information about the thelist mailing list