REFRASE QUESTION :
I have 6 selects. When I select value from select1 I invoke some function from server side and I get JSON array from that function.
I get 5 values at most from this array, sometimes I’ll get 20,30,40,50,60 but sometimes 20,30 or just 20.
These values correspond to select2, select3, select4, select5, select6 option value index. So in case the array returns 20,30,40,50,60 -> select2 option index value should be set to 20, select3 to 30 etc. And if array returns just 20 then select2 index value should be set to 20 and all others index values to 0.
What is the best way to do this?
Thank you
Or, if you want it to happen when the first
<select>is changed: