You are here: irt.org | FAQ | JavaScript | Window | Q823 [ previous next ]
Place the following in the document to be loaded in a popup window.
<BODY onBlur="self.focus()" onUnload="window.open('window.htm',window.name + 'x','width=200,height=250')">
It can however be defeated by disabling JavaScript.
Microsoft Internet Explorer can use the unBeforeUnload to ask the user if he/she really wants to close: http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeunload.asp
For a good article, please read http://developer.netscape.com:80/viewsource/goodman_modal/goodman_modal.html