Am using comboBox with enablefilteringmode.
Client side Code:
dhxCombo.enableFilteringMode(true, "php/get_items.php", true, true);
Everything works fine except when i have special characters.
To take care of this, i added the urlencode function (see code below) and now i do not get “Invalid XML” error. However, in the combo box, i see these special characters with their encoding
function getDataFromDB($mask,$pos){
global $tblname;
header("Content-type:text/xml");
print("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
$sql = "SELECT value FROM $tblname WHERE value like '".mysql_real_escape_string($mask)."%'";
$sql.= "Order By value LIMIT ". $pos.",20";
if ( $pos==0)
print("<complete>");
else
print("<complete add='true'>");
$res = mysql_query ($sql);
if($res){
while($row=mysql_fetch_array($res)){
print("<option value=\"".$row["id"]."\">"); /* change xValue to pxId etc. based on appropriate information */
print(urlencode($row["value"]));
print("</option>");
}
}else{
echo mysql_errno().": ".mysql_error()." at ".__LINE__." line in ".__FILE__." file<br>";
}
print("</complete>");
}
Is there a way i can show them without the encoding?