Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Alex on Jul 29, 2009 23:59
open dhtmlx forum
Same xml on comboboxes

Hi, I've a small problem: i have some comboboxes with the same xml source. This cause slow page loading.

It's possible to make a loadxml 1 time for all combos with the same xml sorce?

Thanks
Answer posted by Alex (support) on Jul 30, 2009 01:21

Hello, 

data can be added from xml string. So, you can load xml once from server and then add options using loadXMLString. 

In order to load XML you can use dhtmlxAjax. For example:

dhtmlxAjax.get("data.xml",outputResponse);

function outputResponse(loader){
  var xml = loader.doSerialization();
  combo1.loadXMLString(xml);
  combo2.loadXMLString(xml);
  ...
  comboN.loadXMLString(xml);
}

But if there are a lot of options possibly in we be better to use dynamic loading for each combo:

dhtmlxCombo/samples/filtering/combo_filter.html

http://dhtmlx.com/docs/products/dhtmlxCombo/samples/filtering/combo_filter.html

Answer posted by Alex on Jul 30, 2009 02:47

OK, i tried and i've resolve the problem.

Thank you.