I've only lightly modified the components of this autosuggester:
http://woork.blogspot.com/2008/03/php-components-autosuggest.html .
Unfortunately it's functionality is rather limited in that it only produces the drop down list of matches in the database. I would like a mouse click on an element of the list to copy it's contents into the search bar.
My javascript is pretty weak though 😉, so I was thinking maybe some onclick="getElementById(search-q).value = getElemenyById(an id i create that corresponds to each element of the list that the php creates), but I'm not sure how to implement it. Any advice/reference material would be greatly appreciated.