This is not JQuery specific per se, but a generalized JavaScript
problem. I happen to be using JQuery in my application, so the
solution will most certainly be implemented with JQuery.

I have a multi-page form which I allow the user to navigate freely
before validating and submitting.  There is a "save and continue"
button, but also an html nav menu that allows navigation w/o saving.

Customer has requested that the nav menu also save so users are never
suprised to learn they lost any changes they made.

I need a way to monitor the form fields for changes (fields consist of
text, select, and textareas only) and then on click in the html nav
menu prompt the user for unsaved changes.

I'm just looking for a basic methodology on how to set this up.

I am thinking I'll need an event listener to monitor the form fields
for onkeyup and onchange events which would flip a value somewhere
from 0 to 1 (not edited to edited), and then onclick of the html menu
prompt the user with an alert warning them to save before continuing.

Is there any easier way to accomplish this?

Thanks.

Reply via email to