isolating a property of a particular radio button

Q

Quiller

Hello.

I have a group of radio buttons (all with the same name) and I'm
trying to set a property of one of them using this code ---

document.desc.color[2].deps = new Array('q10', 'q11', 'q15');

When the form is being processed radio buttons with the above property
set is detected with like this ---

for (var i=0; i < document.form1.elements.length; i++) {
e = document.forms['desc'].elements;
if (e.deps) {}
}

The idea is that when someone selects the third radio button named
color then textfields q10, q11 and q15 have their optional properties
set to true. This works fine, however...

Currently, it works no matter WHICH of the four radio buttons is
selected! Its as if the props property has been added to the whole
group, not just the third one -- i.e. document.desc.color[2].

Anyone explain this.

Thanks in advance.
 
T

Thomas 'PointedEars' Lahn

Quiller said:
Currently, it works no matter WHICH of the four radio buttons is
selected! Its as if the props property has been added to the whole
group, not just the third one -- i.e. document.desc.color[2].

See <[email protected]> two days ago.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,114
Latest member
GlucoPremiumReview
Top