Wednesday, 11 September 2013

result format from a Jquery autocomplete

result format from a Jquery autocomplete

I'm having problems with autocomplete and jquery. A web page return the
following array:
[{'id':'test','value':'test'},{'id':'test','value':'test2'}]
the page with the jquery code includes the following snippet:
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.9.2.custom.js"></script>
<input type="text" id="field" />
<script>
$(function() {
$("#field").autocomplete({source: "http://localhost/richieste/mypage.asp"});
});
</script>
I see from the log that the web page is called but no autocomplete shows
up? Is there anything werong in the array maybe?
Thanks

No comments:

Post a Comment