hello can some one help me i get a error from this code in IE function agreeTerms() { document.getElementById("upload").disabled=false document.getElementById("checkBox").checked=true } function denyTerms() { document.getElementById("upload").disabled=true document.getElementById("checkBox").checked=false } Code (markup): any idea whats wrong ?
'document.getElementById(...)' is null or not an object and the checkbox is like this <input type="checkBox" onclick="if (this.checked) {agreeTerms()} else {denyTerms()}"> Code (markup):
You would need to have it be: <input id="checkBox" type="checkBox" onclick="if (this.checked) {agreeTerms()} else {denyTerms()}"> Code (markup): to use getElementById() correctly.