[CODE]<html>
<head>
<script type=”text/javascript”>
function makeDisable(){
var x=document.getElementById(“mySelect”)
x.Orange.disabled=true;
}
function makeEnable(){
var x=document.getElementById(“mySelect”)
x.Orange.disabled=false;
}
</script>
</head>
<body>
<form>
<select id=”mySelect” size = 4>
<option>Apple</option>
<option>Banana</option>
<option>Orange</option>
</select>
<input type=”button” onclick=”makeDisable()” value=”Disable list”>
<input type=”button” onclick=”makeEnable()” value=”Enable list”>
</form>
</body>
</html>
I want to be able to enable/disable items in a drop down menu on the Client Side. The code I provided does not work. I can enable/disable the entire Select box by removing the Instances of Orange in the Functions, but that is not what I want to do. Anyone have suggestions? thanks.
source:[URL=”http://www.codetoad.com/javascript/enable_disable_form_element.asp”]http://www.codetoad.com/javascript/enable_disable_form_element.asp