Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Dennis on Jan 25, 2008 08:45
open dhtmlx forum
Ampersand (&) not recognized with keystroke

Here is the sample code I tested with using v.1.2 build 71114. When I click the value that contains "&" from the drop down, the value is alerted correctly. However, when I use keystrokes to select the value then tab out of the control, it alerts the option text.
Can someone please help me figure out why it's doing this?

<html>
<head>
<script type="text/javascript" src="dhtmlxcommon.js"></script>
<script type="text/javascript" src="dhtmlxcombo.js"></script>
<link rel="stylesheet" type="text/css" href="dhtmlxcombo.css" />

<script type="text/javascript">
var dhtmlxComboObj;
window.onload = function() {
    dhtmlxComboObj = dhtmlXComboFromSelect("testSel");
    dhtmlxComboObj.enableFilteringMode(true);
    dhtmlxComboObj.attachEvent("onBlur",function(event){alert(dhtmlxComboObj.getActualValue());});
}
</script>
</head>
<body>
<select id="testSel">
<option value=""></option>
<option value="1">A & B</option>
<option value="2">C D E</option>
<option value="3">FGH</option>
<option value="4">I.J.K</option>
<option value="5">L&M</option>
<option value="6">"NOP"</option>
<option value="7">'Q'RS</option>
</select>
</body>
</html>

Answer posted by Support on Jan 29, 2008 08:22
Problem confirmed and fixed ( was caused by converting & to &amp; )
Please use attached js file instead of original one.
Attachments (1)