asp:RadioButtonList

G

Guest

I have below.

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

<asp:listitem value="Yes">Yes</asp:listitem>

<asp:listitem value="No">No</asp:listitem>

</asp:RadioButtonList>



In my codebehind I have
rblConfirm.Attributes["onclick"] = "javascript:EnableIndependentValues(this)";

How do I get the selected value in my Javascript?

Also why does onchange not work?
 
B

bruce barker

the radio button list is table or span (depending on layout) with radio
buttons inside. a table or span does not have a onchange event.

to get the value you need recurse thru the childNodes looking for radio
buttons. then test the checked property.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top