Hello
I’ve been trying to load a list as the text for the combobox component.
And I’ve succeded until I’ve placed it in my server.
Here’s the code I’ve used.
If someone could help, I’d be must thankful.
—code—
“cblocal” is the combobox instance name;
“local text” is the var that contains the txt composed of Area&Local&End
“comboarea” is the container of the var Area in the txt
“combolocal” is the container of the var Local
“pvtit” is the dynamic text field where I want the selected item to show
var localtext = new loadVars();
localtext.load(“locali.txt”);
var ComboArea = localtext.Area.split(",");
var ComboLocal = localtext.Local.split(",");
CBLocal.addItem(“choose…”); //for default reading in the box
for (i=0; i<ComboAreas.length; i++) {
CBLocal.addItem(ComboAreas*, ComboLocais*);
}
CBLocal.setChangeHandler(“localTIT”);
function localTIT(component) {
var LocalName = component.getSelectedItem().data;
pvtit = LocalName;
}
stop;
this is it.
It works on my computer but not online.
The txt file locali is in the same directory as the swf and the html.
Thanks