I'm putting together a search engine. I need a text field (with autocomplete) and a Search button. (Clicking the Search button submits the form.)
There are many javascript autocomplete solutions out there (some are listed at http://webtecker.com/2008/03/10/10-auto-complete-ajax-scripts), but I need one that works in tandem with the Search button.
Specifically, I'm looking for a javascript widget that mimics the functionality provided by Firefox's search bar... When the user types in the text field, the autocomplete presents suggestions in a drop-down. If the user presses Enter (e.g. without touching the drop-down), then the form is submitted (as if the Search button was clicked), and what the user typed into the text field is the value that is submitted to the form. Alternatively, if the user selects a value from the autocomplete drop-down (either via keyboard or mouse), then the text field's value is set to the autocomplete selection, and the form is submitted (as if the Search button was clicked).
I already have the server-side back-end code that generates the autocomplete suggestions.