PHP Classes

Confirm exit

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  Upcoming Visual HTML ...  >  All threads  >  Confirm exit  >  (Un) Subscribe thread alerts  
Subject:Confirm exit
Summary:Confirm exit
Messages:2
Author:flavio r
Date:2014-08-20 13:13:29
 

  1. Confirm exit   Reply   Report abuse  
Picture of flavio r flavio r - 2014-08-20 13:13:29
how to confirm exit of the form if there is a change and was not recorded?

  2. Re: Confirm exit   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-08-21 08:56:37 - In reply to message 1 from flavio r
You need to make the onchange event of the fields you want to track to set a flag to say they were changed. Then you can use the page onload event to show an alert message and prevent that the user leaves the page if any of the fields were changed.

Currently there is no plugin for that purpose, but I may develop one in the future.