[font=Times New Roman][size=3]I found this explanation on how to link two Combo Boxes together on the net. The problem is I don’t completely understand it. Do you understand it, perhaps you could explain it better! [/size][/font]
[size=3][font=Times New Roman] [/font][/size]
[font=Times New Roman][size=3]Explanation: [/size][/font][color=black][font=Verdana]Try first populating Como box in cascade. Using a more general example, suppose that I have two combo boxes, the first with cars, the second with colors. When you select a car, the second combo box populate itself with the avaible colors for this car. In this example, I use simple arrays whit labels, but your data can come from a database or txt file
cars = [“Ford”, “Fiat”, “Mazda”];
Ford = [“green”, “yellow”, “black”];
Fiat = [“red”, “white”, “orange”];
Mazda = [“black”, “white”, “purple”]
Now I put two combobox (myCars and myColors) on stage and populate the first with the cars element and the other with the Ford elements.
myCars.setDataProvider(“cars”);
myColors.setDataProvider(“ford”);
function setColors(comp){
var choice = comp.getSelectedItem().label;
myColors.setDataProvider(eval(choice))
}
Fynally I set the changeHandler of myCars combobox to setColors. If you try, you can see that each time you select a car, myColors combobox changes to reflect the colors. Also you can setup some function when the changeHandler of myColor fires to populate (in the same way) the third combobox. When no selection was fired from previous combobox, you can simply use a “Select a car” or simply disabled it
[/font][/color]