Q:

jQuery autocomplete not properly working

autocomplete opens as I type 1st character, but when I type another character or two it does not filter, remains same.
Even on 1st character, list open is same for anything typed, in order (without filter) as coming from web service.
Here is my code:
$(function() {
  $('#to').autocomplete({
    source: 'json/searchobjects.php',
          minLength: 1,
          select: function(event, ui) {
              globalDest = ui.item.latlng;
          }
  });
});

Here is JSON object:
[
{
label: "label-1",
value: "val-1"
},
{
label: "label-2",
value: "val-2"
} 
]

Its looks I am missing something.
Thanks for any help

A:

I've lived this issue before.  In your PHP script that is serving the results, you need to filter based off of the value your jQuery autocomplete script is passing to it.  Use $_GET['term'] for this filter, as that's what's autocomplete uses.  
The jQuery autocomplete plugin is sending a GET request silently to your script with "term" as the variable, and to my knowledge, you can't configure this setting.
Do note that you may want to up the number of needed characters beyond one, as you're going to get a ton of results returned that your users don't care about.  I find that three characters is often a great balance between speed and usefulness.

