...

View Full Version : Confirm on closing window



Shove IT
04-13-2003, 07: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!

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

http://www.webreference.com/dhtml/diner/beforeunload/

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

Shove IT
04-13-2003, 10: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:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum