问题描述:

I'm using JQuery Autocomplete in my asp.net page. when I type something in the text box it displays "No search results" message in front of text box and it doesn't display any suggestions. I haven't seen "no search results" message box in other implementation. My code is as follows.

var jsonObj = "[{'value':'9a8b581d-1e23-e211-a9a4-00155d01ab06','label':'CCNA'}]";

$('#<%=txtApplicationSkills.ClientID %>').autocomplete({

delay: 0,

source: jsonObj

});

网友答案:

Your jsonObj is wrong. Try removing the quotes "" around it

http://jsfiddle.net/4BvGj/

网友答案:

InPlace for this you can use this. var jsonObj = "[{'value':'9a8b581d-1e23-e211-a9a4-00155d01ab06','label':'CCNA'}]";

var jsonObj = [{'value':'9a8b581d-1e23-e211-a9a4-00155d01ab06','label':'CCNA'}];
相关阅读:
Top