setComboValue()

I load a combobox from a xml file.



Later I wan’t to select an option using setComboValue() instruccion.

But this shows in text of the combo the value I wan’t to attach to the option, It doesn’t select the option.

is there another instrucction to do it?





    



z.setComboValue(“10”);



Thanks a lot!

I load a combobox from a xml file.
Problem can be caused by async. way of data loading.
The combo require some time after loadXML call, to load list of options, so if you will call setComboValue immideatly after loadXML - the data still will not be available and necessary value will not be selected.

You can use second parameter of loadXML to catch the moment, when data available for selection.
z.loadXML(some,function(){
z.setComboValue(“10”);
});