I have an ajax form that I'm working with. I need to detect if a user made a change to the status
dropdown. I am attempting to set a variable thinking that the variable will still have the value I set when the form was submitted, but it does not.
How can I set a variable that will remain set so I can test against it?
if(typeof checkStatus == 'undefined'){
alert('checkStatus is undefined');
var checkStatus = status;
// I'm expecting the next time the form is submitted, checkStatus will be set, but it's not
}else{
if(checkStatus == status){
alert('checkStatus is equal to ' + status);
}
}