I have a problem, to which I have been unable to find a solution for
days now, after checking numerous references (both in books and
online). Perhaps someone here can help. Here's my problem:
I'm trying to define a series of radio objects as a large array for a
survey, like this:
1) Does this make sense?
<input type="radio" name="question[0]" value="Y"> Yes
<input type="radio" name="question[0]" value="N"> No
2) How about this?
<input type="radio" name="question[1]" value="Maybe"> Maybe
<input type="radio" name="question[1]" value="You're crazy"> You're
crazy
Now, when I try to access this object through javascript's DOM, I get
undefined across the board. Every other form object can be defined in
this manner, but because javascript automatically makes the radio
object an array (for each option), it seems unable to define the object
this way. I would have thought that it would define each object as a
two-dimensional array, i.e.:
document.form.question[0][0].value would be "Y";
document.form.question[0][1].value would be "N";
document.form.question[1][0].value would be "Maybe";
document.form.question[1][1].value would be "You're crazy";
and so forth...
I'm ready to scrap the whole idea in favor of a more dumbed-down
version, but if there's a way to make this work i'd prefer it much
more. Even if it doesn't work, I'd like to find a definitive answer
one way or the other!!!!
Thanks,