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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio Button Question/Problem???

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I understand how to iterate through a set of radio buttons to get the value for the one selected by using something like this:
for (i = 0; i < document.formname.radiogroup.length; i++)

However, on IE 5.0, if you have only one radio button in the group, this technique appears to break. The value I get returned for the radiongroup.length is undefined?? Has anyone else seen this strange behavior, and if so, is there a work around?

 
Thanks,

I did manage to use the elements array of the form object to get the same value, though I will try your suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top