Need some assistance with a dynamic dropdown in a form
I created a form that uses js for dynamic dropdowns. I originally set up the dropdowns with values that are used to calculate a total. But the client wanted to 2nd dropdown options to be determined by the selection in the 1st dropdown. I have that working but now can't figure out how to add the values for the 2nd dropdown so the calculation works properly.
I'm including the code below so you can see what I have.
the argument to function "setOptions(chosen)".. Where from is it getting values? Maybe i missed it.. anyways do not use .length property to add and option i.e (selbox.options[selbox.options.length] = new Option('10 Mbps','225')
instead use (selbox.options[selbox.options] = new Option('10 Mbps','225')