[JavaScript] How to close browser window?

Status
Not open for further replies.

Deffexor

Ars Tribunus Angusticlavius
7,607
Moderator
Hi all you JavaScript people,
I've figured out how to close the JavaScript browser window with the: window.close(); call, but this only works effectively when the window you are trying to close was called by JavaScript to begin with. If it hasn't been, then you get a popup asking if you really want to do this. The only way around this is with signed JavaScripts.

Is anyone familiar with how to do this? I've looked at Netscape's website on the documentation on signing Javascripts, but how to do it is not very clear. Is there any way to get or generate a certificate without paying Verisign $400 or so?

Also, I was able to spawn a window without the toolbar and URL line by using: window.open("foo.html","windowhandle","toolbar=no");

Is there any other method to opening a window without the Button toolbar, URL line, etc? (all I want to do is open a window without all the button bars at the top.)

Thanks.
 

reboot

Ars Legatus Legionis
10,818
I'm not sure if it's possible to do this or not, but if it is I can tell I would never go back to a site that closes the window I was using while going to this site. :eek: :mad:

I seriously hope it can't be done.

Is there any other method to opening a window without the Button toolbar, URL line, etc?

Yes it is possible to do that, go to any half-decent pr0n site to find the syntax. ;)

Or if you're at work right now :

(toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no)
 
Status
Not open for further replies.