I have a form created and with one of the dropdown option selections, i’m trying to have the ability to hide another separate form on that page. And with the other 2 available options, it should turn that field back on. Works fine in firefox, not in IE. I’ve tried both onclick and onmousedown and neither work. What am i doing wrong, i gotta get this thing working ?
my code is below
[CODE]
<script type=”text/javascript”>
function On() {
document.getElementById(“hidediv”).style.display = “block”;
}
function Off() {
document.getElementById(“hidediv”).style.display = “none”;
}
</script>
<div class=”form”>
<form action=””>
<select name=”shaft-type” class=”custom” id=”shaftopt” >
<option value=”default” selected=”selected” onClick=”On();”>Shaft Type – Default</option>
<option value=”hollow” onClick=”On();”>Hollow Shaft</option>
<option value=”needle” onClick=”Off();”>Needle</option>
</select>
</form>
</div>
<div id=”hidediv”>
<div class=”form”>
<form action=””>
<select name=”shaft-length” class=”custom” id=”lengthopt”>
<option value=”default” selected=”selected”>Shaft Length – 4cm. (min)</option>
<option value=”media2″>Media 2</option>
</select>
</form>
</div>
</div>