Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by david gislard on Nov 18, 2008 12:31
open dhtmlx forum
dhtmlxcombo

Hello,
sorry for my english,

I would like to make a "setcombovalue" but it doesn't work.
I have downloaded the last version and also the new dhtmlxcombo.js but it is always KO.

The call of setComboValue doesn't change both value and text of combo

this is the code
var z5=new dhtmlXCombo("combo_zone5","alfa5",200);
        z5.loadXML("complete.php");        
        z5.enableFilteringMode(true);                
        z5.setComboValue('13');

Thank for your help
Answer posted by Support on Nov 19, 2008 02:44
The xml loading is async, with your code, setComboValue called before data loaded, which causes issue
Correct code will look as

var z5=new dhtmlXCombo("combo_zone5","alfa5",200); 
  z5.enableFilteringMode(true);  
  z5.loadXML("complete.php",function(){
        z5.setComboValue('13');
 });