in this jquery-ui example, what is the expected json from the server?
in this example should you be returning an array in json or 开发者_开发百科a single comma seperated string?
this is the requested link, and it returns JSON:
http://jqueryui.com/demos/autocomplete/search.php?term=t
Looking at the source code (you can view source farther down on the page - have to expand it), it looks like it returns a JSON format.
function(request, response) {
$.getJSON("search.php", {
term: extractLast(request.term)
}, response);
},
Another way of seeing what you need is use the developer tools in your browsers (or the Firebug plug-in in Firefox) to see what is being transferred between the server and host as you type.
精彩评论