Categories | Question details Back To List | ||||||||
dhtmlxCombo: Firefox incorrect XML I've been trying to get your autosuggest comboBox working in a PHP website. Works on IE (no help), but not on Firefox. Using the most basic script I can: function make_searchbox() { // load libraries $html = '<script src="'.$_SESSION['base_path'].'libraries/dhtmlxcommon.js"></script>'; $html .= '<script src="'.$_SESSION['base_path'].'libraries/dhtmlxcombo.js"></script>'; $html .= '<link rel="STYLESHEET" type="text/css" href="'.$_SESSION['base_path'].'styles/dhtmlxcombo.css">'; $html .='<div id="combo_zone" style="width:200px; height:30px;"></div>'; $html .='<script>'; $html .= ' window.dhx_globalImgPath="'.$_SESSION['base_path'].'images/dhtmlx/";'; $html .= 'var z=new dhtmlXCombo("combo_zone","alfa",200);'; $html .= 'z.enableFilteringMode(true,"'.$_SESSION['base_path'].'libraries/quicklist_return.php",true,true);'; $html .='</script>'; return $html; } with quicklist.php being: <?php header("Content-type: text/xml"); $html = '<?xml version="1.0" encoding="ISO-8859-1" ?>'; $html .='<complete add="true">'; $html .='<option value="1">one</option>'; print($html); ?> I can see in Firebug that the headers are returning without any spaces before the XML tag: <?xml version="1.0" encoding="ISO-8859-1" ?><complete add="true"><option value="1">one</option> I've tried it with and without header call, with longer lists, with and without the encoding statement Thanks. Answer posted by Support on Dec 20, 2008 01:51 a) quicklist.php miss ending </complete> tag b) the complete@add necessary only if you want to add returned value to the existing list Please check attached sample Attachments (1)
Answer posted by Brett the James on Dec 23, 2008 10:25 Thanks, that got it. I'm posting a complete test php test file, since you don't have one on your site: <?php |