$("#showall").click(function() {
var i = $(this).val();
alert(i);
if (i == '1') {
var selectAll = $("#discipline1 option:first").val();
if ($.trim(selectAll) == 'ALL') {
$("#discipline1 option:first").attr('disabled', true);
}
}
});¿
Make the user select an option in the drop down, when a radio button is selected.
2.
How to disable "All" in Drop down when radio button is selected
Hm.. those are 2 different things. Which one do you need? If it's 1, try my example. If it's 2, try myselfrandhawa's.
$("#showall").click(functi
var i = $(this).val();
alert(i);
if (i == '1') {
var selectAll = $("#discipline1 option:first").val();
if ($.trim(selectAll) == 'ALL') {
$("#discipline1 option:first").attr('disab
}
}
});¿
<input type="radio" name="showall" id="showall" value="1" />
<select name="discipline1" id="discipline1" style=width:170px;>
<option value="ALL">ALL</option>
<option value="2">2</option>
<option value="3">3</option>
</select>¿
Check this:
http://jsfiddle.net/NpNFh/6/