Brendon G wrote:
Is is possible to monitor every form element in a form for change?
I tried something like this (and some other variations) to no avail.
$('input,select').change(function(){
// do something
alert("You changed something");
});
Why i want to do it:
If a form element is changed i'm going to set a variable for an
autosave to take place.
The change event is rather unreliable to trigger an autosave. For
example, if you edit a text input, the change event is fired when the
input is blurred (and the value changed since focus), and thats most
likely to late.
Try keyup for text inputs (input of type text and textareas) and click
for buttons (checkbox, radio). I'm sure about selects, change should be
okay.
--
Jörn Zaefferer
http://bassistance.de