View Full Version : Is alert box required when using "javascript:window.close()"

06-01-2004, 06:35 PM
I am using a graphic link with "javascript:window.close()" in order to close a window. However, I don't want the box to pop up that says "the browser is trying to close the window. doyou want it to" or whatever the text is.

Is there any way to get rid of that prompt?

06-01-2004, 06:41 PM
I don't think so. For security purposes, I believe the only time it won't appear is if through the code, your page is the one that opened the window.


06-02-2004, 06:42 AM
See if this works:

function bye() {
self.opener = this;
<img src="hat.gif" onclick="bye()">

06-02-2004, 08:02 AM
That is a bug exploit, so you can't rely on it to work in future releases.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum