bootneck2222
asked on
Activiate a textbox on dropdown selection not working in IE8
Hi,
I need to get a form to activate a textbox based on a dropdown selection. I found the below script which works fine on Firefox, Chrome and IE9+, but will not work on IE8.
Script:
I would like this to work in IE8. Any assistance would be greatly appreciated.
Thank you.
I need to get a form to activate a textbox based on a dropdown selection. I found the below script which works fine on Firefox, Chrome and IE9+, but will not work on IE8.
Script:
<html>
<head>
<script type="text/javascript">
function checkvalue(val)
{
if(val==="others")
document.getElementById('color').style.display='block';
else
document.getElementById('color').style.display='none';
}
</script>
</head>
<body>
<select name="color" onchange='checkvalue(this.value)'>
<option>pick a color</option>
<option value="red">RED</option>
<option value="blue">BLUE</option>
<option value="others">others</option>
</select>
<input type="text" name="color" id="color" style='display:none'/>
</body>
</html>
I would like this to work in IE8. Any assistance would be greatly appreciated.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER