Autocomplete with PHP? Can't figure this out
Okay here's the deal, I'm trying to get autocomplete to work on a form, and its pulling from an PHP file on my server.
<script type="text/javascript">
$(function() { function log(message) {
$("<div/>").text(message).prependTo("#log");
$("#log").attr("scrollTop", 0); }
$("#birds").autocomplete({ source: "search.php", minLength: 2, select: function(event, ui)
{ log(ui.item ? ("Selected: " + ui.item.value + " aka " + ui.item.id) : "Nothing selected, input was " + this.value); } }); });
</script>
This seems to be the right example code, but when I configure it I can't get it to work. Any ideas?