What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 12446 |  Welcome, Guest!   Register  Login
 Home > Forums > jQuery > how to check radiobuttonlist using jquery? ...
Hariinakoti

how to check radiobuttonlist using jquery?

Replies: 3 | Posted by: Hariinakoti on 10/31/2012 | Category: jQuery Forums | Views: 422 | Status: [Member] | Points: 10  


Hi All,
How to check radiobuttonlist using jquery ?

Thanks & Regards
Hari


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Vasanthmvp
Vasanthmvp  
Posted on: 10/31/2012 8:52:14 AM
Level: Starter | Status: [Member] | Points: 25

Hiee here is an example:

<script language="javascript">


$(document).ready(function() {

$("#btnSubmit").click(function() {

alert($("#<%RadioButtonList1%>").find("input[name='<%=RadioButtonList1.UniqueID%>']:radio:checked").val());

});

});

</script>



<asp:RadioButtonList ID="RadioButtonList1" runat="server">

<asp:ListItem>1</asp:ListItem>

<asp:ListItem>2</asp:ListItem>

<asp:ListItem>3</asp:ListItem>

</asp:RadioButtonList>

<input id="btnSubmit" type="button" value="Submit" />

Refer http://forums.asp.net/p/1425301/3178137.aspx#3178137 to view another example.
Regards,

Awesome Coding !! :)

Hariinakoti, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Sureshknkt7
Sureshknkt7  
Posted on: 11/2/2012 9:06:58 AM
Level: Starter | Status: [Member] | Points: 25

HI,

Aspx Code:

<div>

<asp:RadioButtonList ID="radiobtn" runat="server">
<asp:ListItem Text="Hyderabad" Value="Hyderabad"></asp:ListItem>
<asp:ListItem Text="Khammam" Value="Khammam"></asp:ListItem>
</asp:RadioButtonList>
</div>



Jquery code:

<script type="text/javascript">


$(document).ready(function () {
$("#<%=radiobtn.ClientID%>").change(function () {
var rbvalue = $("input[name='<%=radiobtn.UniqueID%>']:radio:checked").val();

alert(rbvalue);
});
});
</script>

Hariinakoti, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Nkkppp
Nkkppp  
Posted on: 11/4/2012 8:10:19 AM
Level: Starter | Status: [Member] | Points: 25

Hi,

$(document).ready(function () {
$(':radio').bind("change", function () {
$('#HyperLink1').attr("href", $(this).val());
});

});

<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem Text="CNN" Value="http://www.cnn.com"></asp:ListItem>
<asp:ListItem Text="BBC" Value="http://www.bbc.co.uk"></asp:ListItem>
<asp:ListItem Text="Channel News Asia" Value="http://www.channelnewsasia.com"></asp:ListItem>
</asp:RadioButtonList>
<br />
<asp:HyperLink ID="HyperLink1" runat="server">Click here!</asp:HyperLink>

Regards,
Prathap.

Hariinakoti, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/22/2013 6:33:04 PM