Accessing radio button arrays within arrays

wxdqz

New Member
I am lost in a mess of arrays =(

Basically, I have a registration form which has a number of fields for each of any number of attendees. The number of attendees is set by the user via a form on a previous page.

So I need to use arrays within the form. Example:
<input type='text' name='txtAttendeeTitle[]' size='20'>

When I reference these via javascript, I loop through using the following syntax:
document.registrationForm['txtAttendeeTitle[]'][j].value

The problem is when I use a radio button as part of the form that each attendee must fill out. First of all, simply using the following syntax:
<input type='radio' name='radAttendeeMembershipUS[]' value='http://www.webdeveloper.com/forum/archive/index.php/true'>

creates a problem in that all radio buttons are considered in the same family.


Has anyone done this before? Do I have to use php to insert an index into the tag such as:
<input type='radio' name='radAttendeeMembershipUS[0]' value='http://www.webdeveloper.com/forum/archive/index.php/true'>

and increment it for each attendee?

If that is the solution - how do I later reference it in a javascript function?

thanks for any help or tips.
 
Back
Top