unload event handling

hello all:I'm having a problem, I'm opening an asp web page using javascript window.open method. The thing is, in the window opened I need to prevent that the user close the window without typing any information required. I mean, I know that I have to check if the user type something in fields in the UNLOAD event of the body tag, but how can I stop the window from closing if the checks are false?I hope someone can help me.thanks in advance.

Comments

The only possible way would be to use return false, but if that works there's a big problem with the browser. Imagine how easy it would be to have a page which doesn't let you leave. Besides, you can never rely on a Javascript being run. You'll need some server-side checks to see if the form is empty, instead.^D$ shameless-plughttp://line-ed.sourceforge.net