On my pages I have a table with rows that typically look like this:
<tr class = "child">
<td>
<asp:CheckBox ID="CheckBoxEyeProblems" runat="server" />
</td>
<td align="center">
<asp:RadioButtonList ID="RadioButtonListEyeProblems"
<asp:ListItem Value="Y">Yes</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
What I am trying to do is to disable/enable radiobuttonlist in the same row as the checkbox when you check/uncheck it.
$('tr.child input:checkbox').click(fucntion()
{
//last part of this selector is incorrect, how to correct it here?
var rblist = $(this).closest('tr.child').find(':input:radio');
if ($(this).is(':checked'))
{
//aslo not sure how to clear selection if any from RadioButtonList here
rblist.attr('disabled', 'disabled');
}
else
{
rblist.removeAttr('disabled');
}
});
So, those are the problems I have. I am using ASP.NET 3.5. Thanks.