View Full Version : window.close() : How to avoid the confirmation prompt ?
manish71mishra
01-31-2003, 06:35 AM
Hii
when we use window.close in java script, it gives the following msg -
The web page you are viewing is trying to close the window. Do you want to close the window ?
I dont want this msg box to be popped up when window.close is issued.
Would appreciate if any one could help please...
Best wishes
Manish
tempest1
01-31-2003, 06:42 AM
The only way is to use activex controls, but that closes the users aol so im not going to be able to give it to you, sry.
tempest1
01-31-2003, 06:42 AM
Oops, double post:o
glenngv
01-31-2003, 10:38 AM
http://aspalliance.com/peterbrunone/impossible.asp
acrokos
07-16-2004, 12:07 AM
Thanks ALL!!! This def. did the trick.
gohankid77
07-16-2004, 04:02 AM
This shouldn't be done because it disables user accessibility to your site, but:
<script language="javascript">
function closewindow() {
self.opener = this;
self.close()
}
</script>
Retrieved from: http://forums.devshed.com/showpost.php?p=472473&postcount=15
using:
Google Search Engine
The only problem is that it only works on IE. :( Will continue searching for a Mozilla/Netscape workaround.
glenngv
07-16-2004, 05:13 AM
Did you read the link I posted? It has a list of the supported browsers using that "bug exploit".
acrokos
07-19-2004, 01:25 AM
yes i read the link/site. very good work around. i am not worried about closing the window on the end user side...thats the intention
look at the example of what i am trying to do
http://www.crokos.com/disclosure.htm
and you will see what i am talking about. thanks again.
Willy Duitt
07-19-2004, 01:38 AM
Hmmm;
Why would anyone need a close window button provided by you?
Anyway, this will soon become mute. When SP2 reaches production and is released that exploit and full size windows will thankfully be a thing of the past and all the developers whom have exploited these bugs in the past will soon be scrambling to fix all of their pages....
.....Willy
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.