Eric Layman wrote on 31 dec 2006 in comp.lang.javascript
:
I have a radio button and a combo box.
"A combo box is a user interface control GUI element. It is a combination
of a drop-down list or list box and a single-line textbox, allowing the
user to either: 1) type a value directly into the control; or 2) choose
from the list of existing options."
<http://en.wikipedia.org/wiki/Combo_box>
That does not exist in HTML, but probably you mean a drop-down list.
Upon changing a value for radio button, the combo box values will be
dynamically updated.
I have an idea on how to go abt doing it but Im stuck into converting
into code.
Well, show your code sofar.
Eg: I will have 3 arrays. arr1, arr2, arr3.
Each array contains the values that is to be in the combo box.
I have 3 radio buttons. r1,r2,r3
I have one combo box, combo1.
Upon clicking r1, combo1's option value will be changed to values of
arr1, etc etc
Please advise. Thanks
It seems you want us to do the javascript coding?
Perhaps you better hire a professional programmer?
Better start programming yourself, this will educate nxt to the getting
of the desired result.
Some help perhaps:
You could start leaving the idea of the arrays and
just build 3 different drop-down lists, of which only one is displayed at
a time, the other two are CSS-display:none;-ed by the radio button
settings.
This will prevent the need of complex DOM child adding and removing.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)