In certain situations, I need to enable or disable a checkbox. I made a function in JavaScript and I can not enable / disable it. Here is the function:
function ValidaCampoInserirAutorizacao(){
var vTussMed = document.getElementById('ind_tipo_mat_med_hid').value;
var vSituacao = document.getElementById('ind_situacao_hid').value;
var vClassif = document.getElementById('cod_grupo_mat_med_hid').value;
var vGrupEst = document.getElementById('cod_grupo_estatistico_hid').value;
if(vTussMed == '5' && vClassif == '998' && vGrupEst == 'MED' && vSituacao == 'A'){
document.getElementById('ind_permite_inc_autori_chkb').enable = true;
}else{
document.getElementById('ind_permite_inc_autori_chkb').enable = false;
}
}
This function is called in events onchange
of radiobutton
s and two select
's.