hi ...
in that case you have to store the values in your app ... it is a good idea to write a kind of utility-function for that purpose ... one that loops through your desired formelements and stores the values of each element within an content-object or something like this. it should create something like the following:
-
// content object
-
var content_obj = {
-
element_name_or_id_1: value,
-
element_name_or_id_2: value,
-
element_name_or_id_3: value,
-
element_name_or_id_4: value
-
// as much elements as you need
-
};
-
later ... probably in the onchange-event of your elements you check the newvalue against the one of your content-object.
-
// refer properly to element_name_or_id_1 (here we use the id)
-
var ele = document.getElementById('element_name_or_id_1');
-
if (ele.value != content_obj['element_name_or_id_1']) {
-
// or whatever you want to check
-
}
-
you may set the content_obj[element_name_or_id_1] to newvalue when the check was successful or call your utility-function again so that it stores the actual values and you may compare again old- and newvalues ...
thats the idea ... hope it helps ...
kind regards ...