i'm presuming you mean something like google's suggest feature...
test = input.value;
send an xmlhttp request off to the server and in the response, grab the results and put it in a relative box to the one that you're typing in. If you know how to do the ajax it should be relatively simple. If you need help with it give me a bell.