This week's book giveaway is in the Security forum.
We're giving away four copies of Securing DevOps and have Julien Vehent on-line!
See this thread for details.
Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setting a radio button  RSS feed

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone know how to set a radio button checked with javascript? I'm confused because they have the same name...
<input type=radio name='exampleRadio' value='1'>
<input type=radio name='exampleRadio' value='2'>
so if I want to set the value 2 radio button to checked based on some other user action how do I do it? this.formName.exampleRadio.checked...
thnx.
Joe
 
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a brief example:

Note change "on-Click" to "onClick", had to post the code like this
 
Forget Steve. Look at this tiny ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!