Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2003
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Confirm on closing window

    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!

  • #2
    Regular Coder
    Join Date
    Mar 2003
    Posts
    176
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    New to the CF scene
    Join Date
    Apr 2003
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •