
September 8th, 2004, 09:02 AM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 12
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Responding to click on a radiobuttonlist
Hi
I have a <asp:radiobuttonlist> on my page with a couple of list items. When the user selects any of the listitem (radio button) within the radiobuttonlist I want to perform some client-side calculations. I have added the onclick attribute to the radiobuttonlist using Attributes.Add(). In the javascript function how do I find out which radio button is selected?
<asp:radiobuttonlist id="rdoMultiplyDivide" runat="server">
<asp:ListItem Value="Multiply">Multiply</asp:ListItem>
<asp:ListItem Value="Divide">Divide</asp:ListItem>
</asp:radiobuttonlist>
rdoMultiplyDivide.Attributes.Add("onclick", "CalculateSaleAmount();");
Is this correct way to get the value: "document.getElementById("<%=rdoMultiplyDivide.ClientID%>").value;" ?
Thanks in advance
|