Save form alert

fnbrandao

Member
Hi,
Is there any way to get an alert, when someone fills a form and do not save and leaves the page, so do not loss the inputed data ?
Tks
 
ive not tried but a google around finds references to the window.onpopstate event, so I guess this would work if you placed it in a form_x.js file:

Code:
window.addEvent('onpopstate', function (e) {
  if (confirm('do you want to leave the page') === false) {
    e.stop();
  }
});
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top