Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
94
rated 0 times [  101] [ 7]  / answers: 1 / hits: 52027  / 12 Years ago, fri, august 3, 2012, 12:00:00

I'm trying to figure out how to call a Javascript function only when a checkbox is NOT checked.


Here is my checkbox:


<input type="checkbox" id="icd" name="icd" value="icd" />

Here is the name of the function:


planhide();

More From » checkbox

 Answers
14
document.getElementById('icd').onchange = function() {
if ( document.getElementById('icd').checked === false ) {
planhide();
}
};​

[#83871] Thursday, August 2, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
christianu

Total Points: 481
Total Questions: 124
Total Answers: 99

Location: Trinidad and Tobago
Member since Thu, Dec 1, 2022
2 Years ago
;