Monday, November 22, 2010

Close top window automatically without prompt

In IE6 I used to do this

window.opener="x"
window.close()

The window will close nicely without prompting.

In IE7 it will not work. Instead use the following

window.open('','_self','');
window.close()

No comments:

Post a Comment