Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a value to a radio button..

Status
Not open for further replies.

FreeBASE

Programmer
May 3, 2002
39
0
0
US
Basically I am trying to define a value within my script and have it select the appropriate radio button..

EXAMPLE:

to do this with a text field document.theFormName.textField.value = "My data";

to do this with a selected index field document.theFormName.textField.selectedIndex = 1;

Just don't know how to accomplish this with a radio..

Can anyone help?


N-
 
to do this with a radio button list
document.theFormName.radiobuttonname[x].checked=true;

Where "x" is the index of the radio button in the list to be selected.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top