Loading data from the server into a combo box?

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:

<?xml version="1.0" encoding="UTF-8"?>
<complete>
   <option value="1">one</option>
   <option value="2">two</option>
</complete>

However, when I try to achieve the same by loading the data dynamically from the server, using

         g_combo.load( "mycombo.php" ); 

where mycombo.php is a server side script producing exactly the same xml as above, the combo box remains empty.

What am I overlooking?
Your help is greatly appreciated.
Bertwim

Could you please, share with a demo link, where the problem can be reconstructed.

Also, please, check the content-type in your generated xml.
It should be:
Content-Type:“application/xml”

he usado el dhtmlxcombo para cargar un XML con todos los registros de una tabla,
con ella hago mas facil la busqueda, para modificacion o eliminacion

este es el codigo de
load_combo.php

<?php include("conexion.php"); header("Content-Type: text/xml"); function p($s) { if (!get_magic_quotes_gpc()) return mysql_real_escape_string($s); return $s; } function r($s) { return str_replace("'", "\\'", $s); } if(isset($_GET["campo"])) $campo = $_GET['campo']; else $campo = "item"; if(isset($_GET["tabla"])) $tabla = $_GET['tabla']; else $tabla = "personal"; $bd = conectar(); $bd->Execute("SET NAMES utf8"); $xml = '<?xml version="1.0" encoding="UTF-8"?>'.

‘’;
$sql=“SELECT $campo c1 FROM $tabla where eliminado= 0 ORDER BY LOWER($campo)”;
$r = $bd->Execute($sql);
while ($o = $r->fetchrow()){
$xml .= ‘’;
}

//mysql_free_result($r);
$xml .= ‘’;
print_r($xml);
?>


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