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.
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.