I have this coding on a check box:
<input type="checkbox" name="ECVValve" id="ECVValve" onChange="setEcvcheck();">
The check box can also be checked by another function (activated under certain conditions) that looks like this.
function setEcvcheck() {
if (document.getElementById("ECVValve").checked) {
document.getElementById("ECVValve").checked = false;
} else {
document.getElementById("ECVValve").checked = true;
}
}
It appears that if the checkbox is "checked" by the function setEcvcheck, the onChange event is not fired. Is that how it works or am I missing something else?
onchangedeclaration? Share it please.onchangewith a small c?