Is it possible to have an event that, depending on the change of a hidden input, does certain actions?
I've done this for a checkbox
, but I'm not able to do the reverse ...
function getBitCheckbox(checkboxElem) {
console.log(checkboxElem.id);
if (checkboxElem.id == 'checkbox_bitInativo') {
if (checkboxElem.checked) {
// set bit Anulado a true
$("#bitInativo").val(1);
} else {
//set bit Anulado a false
$("#bitInativo").val(0);
}
}
if (checkboxElem.id == 'checkbox_bitAprovado') {
if (checkboxElem.checked) {
// set bit Aprovado a true
$("#bitAprovado").val(1);
} else {
//set bit Aprovado a false
$("#bitAprovado").val(0);
}
}
}