PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → How te prevent a website from closing if data are unsaved
How te prevent a website from closing if data are unsaved
Débuté par Stefan Buteneers, 11 oct. 2013 10:34 - 1 réponse
Posté le 11 octobre 2013 - 10:34
Hi all,

The title says it all: I want to generate a warning when a user tries to close a website using the X of the browser tab or the X of the browser application when he/she still has unsaved changes within the website environment.
I want to ask the user wether to quit saving changes or quit alltogether without saving changes.

I would prefer to show him/her a customised page that pops up when the website detects unsaved changes. The popup should be able tot stop the initiated process of terminating the web page.

Any ideas ?

Stefan
Membre enregistré
8 messages
Posté le 16 décembre 2013 - 19:53
To my knowledge you would have to user javascript:
http://stackoverflow.com/questions/2923139/prompt-user-before-browser-close

--
Zach Allen
BaseBridge Ltd.
Software Developer