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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cancel alert after javascript:window.close()

Status
Not open for further replies.

ssidetv

Technical User
Aug 30, 2001
57
0
0
GB
I have successfully added the above command to a button in a Flash navigation bar - it's necessary as I am running IE in kiosk mode so there's no menu bar.

Anyway, when I press the button I get the alert asking if I really want to close the browser window.

Is there a parameter I can add to bypass the alert and simply close the window?

Thanks

Nick
 
<script>
function closerWin(){
self.opener = this
self.close()
}
</script> Get the Best Answers! faq333-2924
&quot;A witty saying proves nothing.&quot; - Voltaire
mikewolf@tst-us.com
 
true... =========================================================
if (!succeed) try();
-jeff
 
mwolf00

The script that you mentioned here and in my post
did not really work.

What I had done was create a window using the window.open method.

There I had given an onClick event using your code. The browser still asked for confirmation.

I was using IE 5.0

When I used the window.close() function , it closed without asking for a confirmation.

Are there restrictions based on the browser or other issues?
Normally they ask for a confirmation if I use the window.close() command
 
I guess you could say...

<script>
function closerWin(){
if (self.opener == &quot;&quot;) {
self.opener = this
}
self.close()
}
</script> Get the Best Answers! faq333-2924
&quot;A witty saying proves nothing.&quot; - Voltaire
mikewolf@tst-us.com
 
Thanks for the advice. Am working on it.

Jeff Emminger.....can you contact me offline, plse? Long time no contact!! Left US, now in UK....

Use statesidetv@yahoo.com

Thanks,

Nick Peters
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top