Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Prasad Joshi on Feb 16, 2009 22:29
open dhtmlx forum
DHTMLX Combo

Hello Sir,

Strange thing happened with dhtmlx combo, i am using var opt= z.getOptionByLabel("some text"); and retrieving the option.

in mozilla when i alert ("some Text") then alert(opt) shows [object object ], but when i removed the alert then it will give me null for opt. Please suggest solution.

Prasad Joshi
Answer posted by Alex (support) on Feb 17, 2009 09:04

Hello,

This method can be called only after data loading. The second parameter of the loadXML method is the function which is called after xml loading. 

For example:

combo.loadXML("some.xml",function(){

 var opt= z.getOptionByLabel("some text");

alert(opt);

})

If problem persists, please provide the sample to recreate it.