Is there any function available in JQuery to detect the value change of a specific field on submit?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is perfectly possible to do.
Firstly you need use the change event on each select or input to see if it has been changed and set a flag (this flag needs to be global:
Then you need to add a submit event onto the form to see if the flags have been set and then do something else. If you return false from the submit event then the form will not be sent.
This just checks to see if they have been used but not if they are actually different values. If you want to compare the new value to the old one, then on the page load you will need to create an array of the old values then compare them to new ones either on select change or on form submit.