Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1769 How to avoid the confirmation dialog box when closing a window in Internet Explorer?

irt.org | Knowledge Base | JavaScript | Window | Q1769 [ previous next ]

Q1769 How to avoid the confirmation dialog box when closing a window in Internet Explorer?

I noticed there were several attempts to combat this situation in the faqs but none worked for me. Then I stumbled upon the fact that IE only asks for confirmation if window.opener is empty. The code below works beautifully on IE but I have yet to try it in other pertinent browsers.

myWindow = window.self; 
myWindow.opener = window.self; 
myWindow.close();

Submitted by Karl Greenhalgh

Feedback on 'Q1769 How to avoid the confirmation dialog box when closing a window in Internet Explorer?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.