0

How do I start with the drop down list disabled?

<head>

<script type="text/javascript">
function makeDisable()
{
    var x=document.getElementById("mySelect")
    x.disabled=true
}
function makeEnable()
{
    var x=document.getElementById("mySelect")
    x.disabled=false
}

</script>
</head>
<body>

 <select id="mySelect">
 <option>Apple</option>
 <option>Banana</option>
 <option>Orange</option>
 </select>

<br />

<input type='radio' name='campustype' value='in' onclick="makeDisable()" checked='1' /><label for='incampus'>In-campus</label><br />

<input type='radio' name='campustype' value='off' onclick="makeEnable()" /><label for='offcampus'>Off-campus</label>



</body>
</html>
2
Contributors
2
Replies
9
Views
3 Years
Discussion Span
Last Post by NA7KR
0
function onLoad()
{
  makeDisable();
}

<body onload="onLoad();">
...
</body>

Should do the trick...

Ryan

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.