I have the following table:
<table id="tableID">
<tr id="rowID">
<td class="qCol">
<select name="select1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</td>
<td class="qCo2">
<!-- img here -->
<input type="text" name="text1" id="text1" />
</td>
<td class="qCo3">
<select name="select2">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</td>
<td class="qCo4">
<!-- radio buttons here -->
<input type='radio' name='name' value='1'>
<input type='radio' name='name' value='2'>
<input type='radio' name='name' value='3'>
</td>
<td class="qCo5">
<select name="select3">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</td>
<td class="qCo6">
<!-- hidden validation image here -->
</td>
<tr>
</table>
and I have the following jQuery
$("#rowID input[type=text]").blur(function () {
if ($(this).children("input:radio").is(':checked')) {
alert("yes");
} else {
alert("no");
}
});
however regardless of whether one of the radio buttons is selected I'm still getting the alert "no". Now I know I can see the name of the radio button group but in certain situations I won't be able to due to GUIDs - what's the best method or way to work through the dom starting at the onblur event of the textbox on the same row to determin if one of the radio buttons is checked.