Dinesh Kumar
asked on
jquery issue with radio buttons
Hi I want to do the work which is done on radio button click in button(named Button1) click, kept blank below, Please help
<script type="text/javascript">
$(document).ready(function () {
$(".myRadios").bind("click", function () {
alert($(this).val());
alert($(this).closest("td").next("td").html());
alert($(this).closest("td").next("td").next("td").html());
});
$(".btncss").bind("click", function () {
});
});
</script>
<div id="abc">
<br />
<br />
<table id="tbl">
<tr>
<td>
<input class="myRadios" name="abc1" id="abc1" type="radio" value="1" /></td>
<td>11</td>
<%--<td>22</td>--%>
</tr>
<tr>
<td>
<input class="myRadios" name="abc1" id="abc1" type="radio" value="2" /></td>
<td>22</td>
<td>33</td>
</tr>
<tr>
<td>
<input class="myRadios" name="abc1" id="abc1" type="radio" value="3" /></td>
<td>33</td>
<td>44</td>
</tr>
<tr>
<td>
<input class="myRadios" name="abc1" id="abc1" type="radio" value="4" /></td>
<td>44</td>
<td>55</td>
</tr>
</table>
<input id="Button1" type="button" value="button" class="btncss" />
</div>
ASKER
the problem is that whenever I click on Button1
I will check if radio button is selected then I want to pick values from corresponding two <td>s
e.g if I select second radio button and then press the Button1 then corresponding td are <td>22</td> <td>33</td> I should be able to get those values.
I will check if radio button is selected then I want to pick values from corresponding two <td>s
e.g if I select second radio button and then press the Button1 then corresponding td are <td>22</td> <td>33</td> I should be able to get those values.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much!!
ASKER
It worked like a bolt :)
$("#Button1").attr("disabl