jquery autosuggest not firing (webform)
Posted
by Abu Hamzah
on Stack Overflow
See other posts from Stack Overflow
or by Abu Hamzah
Published on 2010-04-28T19:48:32Z
Indexed on
2010/04/28
19:57 UTC
Read the original article
Hit count: 208
autosuggest
|webform
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>
© Stack Overflow or respective owner