This question had come up the other day and thought others might find this useful.

When you call the window.close() method, Internet Explorer checks whether the opener value is the same as the calling window. If it's not, then the user is prompted with a security dialog asking whether they really want to close the window.

You can work around this by setting the property yourself and thus tricking IE into closing without a prompt.

function closeThisWindow()
    window.opener = window;

(Not tested in Firefox)

blog comments powered by Disqus