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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to create a 'Close page' message for unsaved web form data?

    How can I generate a message "Do you really want to move away from this page? You have not saved your data changes" .

    ... when someone attempts to close a web form page via the Red-X button without submitting / saving thier data first?

    Rhett

  • #2
    New Coder
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I'm not sure

    I'd think that'd have to do with a more windows problem; like have CGI running in the background. However, if someone finds out, could you tell me as well? I could really use that...

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Close Window Alert

    Anyone know how to generate an alert if the page is being closed by the user, before saving data?

  • #4
    Regular Coder
    Join Date
    Nov 2003
    Location
    Vancouver Island Canada
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <html> 
    <head> 
    <script language=javascript> 
    
    function confirmit() 
    { 
    event.returnValue = "Are you sure ??"; 
    } 
    
    </script> 
    </head> 
    
    <body onbeforeunload="confirmit();"> 
    
    hahhahahhahaa 
    
    </body> 
    </html>


  •  

    Posting Permissions

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