RadioButtonList SelectedIndexChanged event handling in jquery

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RadioButtonList SelectedIndexChanged event handling in jquery

Ebad.Masood
Hi guys,

I have a RadioButtonList in my asp.net form. What I want is to handle the selected index of the radiobuttonlist using jquery.

<asp:RadioButtonList ID="RdBtnLstOptions" runat="server" onclientclick="pageLoad();">
                                    <asp:ListItem Text="No change." Selected="True" Value="None"></asp:ListItem>
                                    <asp:ListItem Text="Move all" Value="New"></asp:ListItem>
                                    <asp:ListItem Text="Move Job" Value="Existing"></asp:ListItem>
                                </asp:RadioButtonList>

I have written my Jquery something like this:

        function pageLoad() {

           var selectedvalue = $('#<%= RdBtnLstPresortOptions.ClientID %>').find('input:checked').val();
            alert('click');
            if ($.trim(selectedValue) == 'Existing') {
               alert('hit');
            }
            else { }

        });
        }

However, this is not acheiving desired results. Kindly help.
Loading...