HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 8th, 2004, 09:02 AM
solutionhunter solutionhunter is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 12 solutionhunter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #2  
Old September 23rd, 2004, 08:30 AM
frankcow's Avatar
frankcow frankcow is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: http://www.justin-cook.com
Posts: 133 frankcow User rank is Private First Class (20 - 50 Reputation Level)frankcow User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 h 34 m 16 sec
Reputation Power: 5
you have to loop through the radio buttons, and check which one is selected, then take it's value

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Responding to click on a radiobuttonlist


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway