butterbur
12-05-2003, 04:05 PM
Hi peeps, hope I can get some help on this.
Using an example someone was kind enough to post I have two combo boxes on the stage, the first of which has an instance name of subjects_cb and has the following hard coded info:
labels: books, music, hardware
data: arbooks, armusic, arhardware
A second combo box on the stage, called details_cb, should have its contents changed using the following code:
arbooks=new Array("fiction","horror","non-fiction");
armusic=new Array("rock","country","pop");
arhardware=new Array("harddrive","cpu","memory");
subjects_cb.setChangeHandler("loadDetails");
loadDetails=function(){
var loadArray=subjects_cb.getSelectedItem().data;
details_cb.removeAll();
for(var i=0;i<this[loadArray].length;i++){
details_cb.addItem(this[loadArray][i],null);
}
};
Well as you can probably guess, it don't do it. Please have mercy on this old brain and point me in the right direction.:)
Regards to all.
BB
Using an example someone was kind enough to post I have two combo boxes on the stage, the first of which has an instance name of subjects_cb and has the following hard coded info:
labels: books, music, hardware
data: arbooks, armusic, arhardware
A second combo box on the stage, called details_cb, should have its contents changed using the following code:
arbooks=new Array("fiction","horror","non-fiction");
armusic=new Array("rock","country","pop");
arhardware=new Array("harddrive","cpu","memory");
subjects_cb.setChangeHandler("loadDetails");
loadDetails=function(){
var loadArray=subjects_cb.getSelectedItem().data;
details_cb.removeAll();
for(var i=0;i<this[loadArray].length;i++){
details_cb.addItem(this[loadArray][i],null);
}
};
Well as you can probably guess, it don't do it. Please have mercy on this old brain and point me in the right direction.:)
Regards to all.
BB