Just wondering can anyone give me an example on how to disable a dropdown box, when an option in one isnt selected?
e.g
<td class="Item">State(Aus only):</td>
<td class="Data">
<select class="TextBox" name="State" id="selectState">
<option>New South Wales</option>
<option>Northern Territory</option>
<option>Queensland</option>
</select>
</td>
<td class="Item">Country:</td>
<td class="Data">
<select class="TextBox" name="Country" id="selectCountry">
<option value="Australia" id="Australia" name="Australia">Australia</option>
<option value="Braz">Brazil</option>
<option value="China">China</option>
</select>
</td>
<script>
function selected()
if(document.selectCountry.checked)
{
document.getElementById("selectCountry.Australia").disabled = false;
}
else
{
document.getElementById("selectCountry.Australia").disabled = true;
}
</script>
I want the State dropdown disabled with JAVASCRIPT unless Country is selected to be Australia.. can I get some help please?
I'm still kinda new to this whole Javascript coding so sorry if my code is bad but i hope you get my question