I’m struggling getting a combo box with options loaded dynamically from the server.
g_combo = new dhtmlXCombo({ parent: "layoutdiv2", width: "300px" });
The static case works: When I do
g_combo.load( "mycombo.xml" );
the file mycombo.xml is loaded, in line with the documentation and samples.
The data file mycombo.xml looks like:
en los archivos principales cargo el combo asi:
function Combo_personal(){
var c = new dhtmlXComboFromSelect(“comboBox3”);
c.load(“loadCombo_generica.php?campo=item&tabla=personal”);
c.enableFilteringMode(true);
c.attachEvent(“onChange”, function(value){
if (value != null) {
xajax_Buscar_Personal1(value,‘xnombreP’); // muestra la informacion del item seleccionado en los campos respectivos
}
});
}
Thanks for pointing me in the right direction. The problem indeed was the contents type, which was not set correctly.
After changing it to text/xml, it all works aas expected.
Apparently it is the ‘xml’ part that is most important here.
Thanks!
Bertwim
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan