I am trying to create a function using javascript that disables and enables parts to a form. Here is the code:
<script language=”javascript”>
<!–
function disable(){
document.forms[1].StartDate.disabled=false;
document.forms[1].TerminationDate.disabled=true;
document.forms[1].StartDate.value=””;
document.forms[1].TerminationDate.value=””;
var announce= document.getElementById(“announce”);
announce.style.color = “#cccccc”;
}
function enable(){
document.forms[1].StartDate.disabled=true;
document.forms[1].TerminationDate.disabled=false;
var announce= document.getElementById(“announce”);
announce.style.color = “#000000”;
}
//–>
</script>
the error that I am getting is that the StartDate is Null or not an object, and I am not sure what to do. Hopefully this is enough information, Thanks in advance.