cleanair4me
Technical User
- May 16, 2008
- 61
I have 2 drop downs where I want the second one to be disabled. It will only be enabled after the first drop down has been selected.
Here is my attempt but not working because the second drop down is always enabled:
Here is my attempt but not working because the second drop down is always enabled:
Code:
<script>
function enableField()
{
if(document.myname.movie.value != "")
{
document.myname.television.disabled=true;
}
}
</script>
<form name="myname" method="post" action="page.jsp">
<select name = "Movie" onselect="enableField()";>
<option value = "">Select One</option>
<option value = "I am Legend">I am Legend</option>
<option value = "Wedding Crashers">Wedding Crashers</option>
<option value = "Jaws">Jaws</option>
</select>
<select name = "Television">
<option value = "">Select One</option>
<option value = "CSI">CSI</option>
<option value = "Amercian Idol">American Idol</option>
<option value = "60 Minutes">60 Minutes</option>
</select>