The first implementation works properly. The second provides a dropdown list, but it is not filtered as you type.
$( "#tags" ).autocomplete({
source: availableTags
});
$( "#tags1" ).autocomplete({
source: "http://nwx1/mysql/useractivitytxn/f_UsersList.php"
});
...
<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags">
<label for="tags1">Tags1: </label>
<input id="tags1">
<label for="tags2">Tags2: </label>
<input id="tags2">
</div>
var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ];
the return value from the web service: ["ActionScript","AppleScript","Asp","BASIC","C","C++","Clojure","COBOL","ColdFusion","Erlang","Fortran","Groovy","Haskell","Java","JavaScript","Lisp","Perl","PHP","Python","Ruby","Scala","Scheme"]
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/ui/1.8.22/jquery-ui.min.js" type="text/javascript"></script>
<script src="http://jquery-ui.googlecode.com/svn/tags/latest/external/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>