aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes setting a radio button Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "setting a radio button" Watch "setting a radio button" New topic
Author

setting a radio button

Joseph Miller
Greenhorn

Joined: Jun 19, 2001
Posts: 21
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
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Here is a brief example:

Note change "on-Click" to "onClick", had to post the code like this
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: setting a radio button
 
Similar Threads
how to retrieve data into radiobuttons
Radio Buttons
selecting a radio button for IE & Netscape
checkbox
Pass radio button to servlet