here is the JSON data for my auto complete
{ "list" : [ {
"genericIndicatorId" : 100,
"isActive" : false,
"maxValue" : null,
"minValue" : null,
"modificationDate" : 1283904000000,
"monotone" : 1,
"name":"Abbau",
"old_name" : "abbau_change_delete_imac",
"position" : 2,
"systemGraphics" : "000000",
"unitId" : 1,
"valueType" : 1,
"description" : "Abbau",
"weight" : 1
}]}
and the code which i wrote is
$("#<portlet:namespace />giName").autocomplete({
source :`enter code here` function( request, response ) {
$.post(
"<%=AJAXgetGIs%>",
{
"<%=Constants.INDICATOR_NAME%>" : request.term,
"<%=Constants.SERVICE_ID%>" : <%=serviceId%>
},
function( data ) {
response( $.map( data.list, function( item ) {
//alert(item.name + " || " + item.genericIndicatorId);
item.value = item.name;
return item;
}));
},
"json"
);
},
minLength : 2
i am using jquery-ui-1.8.14.autocomplete.min.js plugin for auto complete the problem i am getting is it is not showing all the matched results in new browsers. for example if i type "an" in which should matches to the "anzahl" keyword, the fire bug is showing error like "bad control character literal in a string". results are showing for the letters "as,sa....". any help would be appriciated thank you