I’m developing a website in php.
I want to show a message something like javascript alert, when a user tries to edit or add something in a form and tries to navigate to some other section without saving the modification, i want to show a message to them,
that you are about to navigate about from this page, your modifications are not saved, do you want to continue?
how can i do this??
any one have an idea ???please share it with me..
Thanks
Use the beforeunload event. Pseudo-code:
Your job is to implement the userHasEditedSomething function that will return true when the user has unsaved changes (filled-in form fields) and false otherwise.
most of the browsers support this event