For the 2nd part of your question, what you're talking about is an 'auto completer', there are lots of examples of this available
e.g jquery
http://www.ajaxdaddy.com/demo-jquery-autocomplete.htm[
^]
The technique is to make an ajax call when users type into a text box, retrieve a list of possible completion values from whatever source and display them when the ajax call completes