By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,700 Members | 1,458 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,700 IT Pros & Developers. It's quick & easy.

isolating a property of a particular radio button

P: n/a
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[i];
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.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Quiller wrote:
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 <3F**************@PointedEars.de> two days ago.
PointedEars

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.