Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quit command

Status
Not open for further replies.

samusa

Programmer
Jan 1, 2001
107
US
Hi
I have command button which should quit the webpage if clicked. If I am using window.close, it is working though it is giving me message " the page will be closed...." I want no message just close the page.

Sam
 
It is only possible for ie to-date, it might be changed one day too, who knows. In the onclick handling, set the opener to something like null/self, for instance.
[tt] onclick="window.opener=null;window.close();"[/tt]
Moz-series would still block the close of the main page or any page for that matter which is not opened by some script.
As you've mentioned about the message, I guess the hack for ie would suit your audience.
 
Thanks, It works fine though i made minor changes

<SCRIPT language=vbscript event=onclick for=exit1>
<!--
window.opener=null
window.close
-->
</SCRIPT>

thanks again

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top