I think you are using the source argument incorrectly for jQuery UI's autocomplete. $(this).val() will get the current value out of the $(this) DOM object (assuming that's what it's pointing to).
Instead the source argument is supposed to be pointing to a source of possible completions for the input. As an example from the jQuery UI website
$(function() {
var availableTags = ["ActionScript", "AppleScript", "Asp", "BASIC",
"C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang"];
$( "#tags" ).autocomplete({
source: availableTags
});
});
As you can see from this example, source points to an array of possible tag values that will be autocompleted when the user starts typing.
To address my new understanding of the OP's question:
To add the user's current entry into the autocomplete, you could use code like the following:
$( "#tags" ).autocomplete("option","source",
availableTags.concat($("#tags").val()));
This would need to be called every time the input changes (using the keypress event might be helpful for this.)
$(this)represents in this snippet."hope the following is self-explanatory"... It's not :) Please add some more details.