Try adding this jQuery to your page. You do not need the shutdown function you wrote
<script type="text/javascript" > $(document).ready(function() { //hook up a click event to all of the inputs in your first group $('input[name="Group1Most"]').click(function() { //identify the value from the checked item in the first group var checkedValue = $('[name="Group1Most"]:checked').val(); //identify the item in the second group and disable it. $('input[name="Group1Least"][value=' + checkedValue + ']').attr('disabled', 'disabled'); }); }); </script>
Assuming the values ββmatch, this will work. You can also do this by index if you want.
if you want only one item to be disabled at a time and to enable the previously disabled item in the second group again, include the next line as the first line in the click function. It will remove the disabled attribute from all inputs in the group.
$('input[name="Group1Least"]').removeAttr("disabled")
Edit:
In response to the comment from @Majid above, the output of the controls is as follows:
<table id="Group1Most" border="0" onclick="disable('Group1Most', 'Group1Least')" > <tbody><tr> <td><input id="Group1Most_0" name="Group1Most" value="1" type="radio"><label for="Group1Most_0"> |</label></td> </tr><tr> <td><input id="Group1Most_1" name="Group1Most" value="2" type="radio"><label for="Group1Most_1"> |</label></td> </tr><tr> <td><input id="Group1Most_2" name="Group1Most" value="3" type="radio"><label for="Group1Most_2"> |</label></td> </tr><tr> <td><input id="Group1Most_3" name="Group1Most" value="4" type="radio"><label for="Group1Most_3"> |</label></td> </tr> </tbody></table> <table id="Group1Least" border="0"> <tbody><tr> <td><input id="Group1Least_0" name="Group1Least" value="1" type="radio"><label for="Group1Least_0"> This and That</label></td> </tr><tr> <td><input id="Group1Least_1" name="Group1Least" value="2" type="radio"><label for="Group1Least_1"> Fire and Ice</label></td> </tr><tr> <td><input id="Group1Least_2" name="Group1Least" value="3" type="radio"><label for="Group1Least_2"> Black and Tan</label></td> </tr><tr> <td><input id="Group1Least_3" name="Group1Least" value="4" type="radio"><label for="Group1Least_3"> Smith and Wesson</label></td> </tr> </tbody></table>
source share