I use jQueryUI’s tabs and when a user changes a form in the tab, it promprts the user that a change has been made.
My question is, how do I revert the values before being changed when the user presses ‘OK’ on my confirm() prompt?
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.
You’ll have to keep track of what the values were before changing them… so something like this should work for you:
And then just call
revertValueswhen you hit OK in your confirmation dialog.A few notes:
:inputselector and keep different sets ofoldValuesfor each tab (& then obviously only revert the values for the current tab.