• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

get the value of selected radio buttion

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to get the value of selected radio buttion in javascript? my radio button code is:<input type="radio" id="e1" name="event1" value="START_TIME" />Start Time <br/>

<input type="radio" id="e1" name="event1" value="END_TIME" />End Time <br/>


<input type="radio" id="e1" name="event1" value="CHANGE_NUMBER" />Change Number <br/>
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

This forum is intended for questions and comments about the web sites www.javaranch.com and www.coderanch.com.
It is not for questions about the Java language - that's what all our other forums are for.


In future please do take out time to CarefullyChooseOneForum
Moving...
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Radio button values are typically sent to a servlet when the submit button is clicked. I'm not sure what you mean by getting the value with JavaScript. Do you mean you want to bind to the click event and get the name/value the instant a radio button is clicked? What if the user changes their mind and clicks a different one? How is the final choice submitted?

Perhaps you should explain a bit more about what you are trying to do instead of how you want to do it. What problem are you trying to solve?
reply
    Bookmark Topic Watch Topic
  • New Topic