I am trying to reset the actual value attribute of an input so that it can be reset back to that value if reset, not necessarily the original value when the form was loaded. The problem is these changes don't seem to take effect. I have tried both:
$(this).attr('value', $(this).val());
as well as....
$(this).val($(this).val());
Neither of these actually change the value="" attribute of the input, which is what is used when a form is reset. The problem is that if someone saves a form (via AJAX), then again edits it and presses reset (w/out saving this time), it will go back to the original values the page loaded with, NOT the values last saved with, which is what I'm trying to get. I know there are ways around this (store in local variables or something), but a jQuery solution would be much better. Any ideas??