I\'d like to warn users when they try to close a browser window if they didn\'t save the changes they made in the web form.
I\'m us
On the Page_Unload event (or call this function in your body tag, ), you can have a check if the form has data in it. Then you could run some Java:
See how that works out for ya
EDIT: It may not prevent the closing of the window, but it will alert your user that they have unsaved data in your form.
Confirmed does NOT work cross-browser, I will investigate a different method and post it up here.