Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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

You are here: irt.org | FAQ | JavaScript | Window | Q1769 [ previous next ]

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?'

©2018 Martin Webb