I have some javascript I want to run when a hidden field is changed (via javascript) Is there any way to do this? (or anyway at all to have a field that is not "visible" in asp mvc that I can get a change event on)
NOTE: I have confirmed that it is not the fact that the field that is hidden that is the problem, but the fact the field is updated with javascript! The change event does not fire when I update a field with javascript.
Edited
To Clarify this works:
//set up change event
$('#154').change(function() {
ScoringDerivation(154, 6,162,165);;
});
<select id="154" name="154"><option value=""><Select></option>
<option value="6001">Good</option>
<option value="6002">Average</option>
<option value="6003">Poor</option>
<option selected="selected" value="6004">No Match</option>
</select>
But this does not:
//set up change event
$('#165').change(function() {
DerivationAdd3(165,166,167,226);;
});
<input id="165" name="165" type="hidden" value="0" /><label id="165Label" name="165Label">0</label>