aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes radio buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "radio buttons" Watch "radio buttons" New topic
Author

radio buttons

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 743
Hello,
I have 2 radio buttons using the same name in a form:

I have a reset button in form that calls the function resetFields.
How can I change the checked button back to the 'Male' option
in this function.

I am tying to use something like...


But that isn't quite right.
Any ideas? Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
It is an array

document.formName.gender[0].checked = true;

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: radio buttons
 
Similar Threads
code attached element existance in javascript
Using Struts Creating the Radio Button for gender
setting a radio button
Question on using DisplayTag in JSPs
Radio Validator