jquery autosuggest not firing (webform)
- by Abu Hamzah
is that something wrong in the below code? its not firing at all
$(document).ready(function() {
$("#<%=txtHost.ClientID%>").autocomplete("HostService.asmx/GetHosts",{
dataType: 'json'
,contentType: "application/json; charset=utf-8"
,parse: function(data){
var rows = Array();
debugger
for(var i = 0; i<data.length; i++){
rows[i] = {data:data[i], value:data[i].LName, result:data[i].LName};
}
return rows;
}
,formatItem: function(row, i, max){
return data.LName + ", " + data.FName;
}
});
});
<script src="Scripts/jquery.autocomplete.js" type="text/javascript"></script>
<asp:TextBox ID="txtHost" runat='server'></asp:TextBox>