[color=black][font=Verdana]The thing is, when I added a third combo box I got undesirable results. Here is the script:
cars = [“Ford”, “Fiat”];
Ford = [“green”, “yellow”];
Fiat = [“red”, “white”];
green = [“2002”, “2003”, “2004” ];
yellow = [“2005”, “2006”, “2007”];
red = [“2008”, “2009”];
white = [“2009”, “2010”];
myCars.setDataProvider(cars);
myColors.setDataProvider(Ford);
myYears.setDataProvider(green);
listener = {}
listener.ref = this
listener.change=function(evt){
var choice = evt.target.selectedItem;
myColors.setDataProvider(this.ref[choice])
}
myCars.addEventListener(“change”, listener)
listener = {}
listener.ref = this
listener.change=function(evt){
var choice = evt.target.selectedItem;
myYears.setDataProvider(this.ref[choice])
}
myColors.addEventListener(“change”, listener)
As you can see I gave the third combo box an instance name of myYears.
When I select fiat in the first combo box, red displays in the second combo box, but the correct years do not display in the third combo box until I reselect red in the second combo box. Why ?[/font][/color]