View Full Version : Confirm on closing window

Shove IT
04-13-2003, 08:26 AM
I am working on a site and I'd like to have a confirm box if the user tries to leave the current page except if they press a button to continue. It's not some lame "Make this your homepage" type message.

It's for an intranet site where the users are required to enter info that gets stored in a DB, so if they don't, I'd like a warning. But if they compete the process and click a submit button, no warning should be displayed.

If anyone is willing to help I can send you a link to the site. It requires a password and I'd rather not give it out on here, although it is all dummy data at this time. Thanks!

04-13-2003, 09:02 AM
If you have control of the browser, and your running IE try this:


With a little imagination, you could get a decent script out of it.

Shove IT
04-13-2003, 11:28 PM
Thanks, I'll try that. If I can't get that to work I might just keep track of when the users log on. Might be better that way so they are less likely to say they did something they didn't if I have proof.:eek: