No response in autocomplete with remote source (JSP)
Hi,
I'm completely new to jQuery, though I have some basic Javascript skill. I'm trying to use the autocomplete widget. It works fine with local data on the page, but I can't make the remote version (reading from database) work. The letters I type in the autocomplete textbox are forwarded properly to my backend JSP/Java code, but the list that I create there is never showed in the browser.
Here are the two relevant snippets from my web page:
<script>
$(function() {
$("#jquery_from_ob").autocomplete({
source: "getblocks.jsp",
minLength: 2,
});
});
</script>
...
<div>
<input id="jquery_from_ob" name="jquery_from_ob" size="20">
</div>
In the getblocks.jsp page, I find the request parameter "term" and generate suggestions accordingly. But they aren't displayed on the web page. I've tried outputting normal strings and JSON-formatted data. A simple attempt might look like this:
<%
for (String block : blocks) {
out.println(block);
}
%>
I would be grateful for any suggestions.