When you get data from a remote server, an ajax session has to be set up in a function inside the source: option. Take a look at this post of mine from a while ago. It has a link to a tutorial, some working code, and some tips.
I've made some change at the end I've realized something. I mean I've tried the function in 2 different programs. In the following it works good: http://scuolaonweb.it/gestionale/autocomplete.php When I insert the town and it gives the zip-code, province, state and nazionality.