PDA

View Full Version : Text box "Auto fill"



mterui
12-11-2006, 10:28 PM
This question is concerning a regular HTML <input type="text"> textbox.

Let's say I have a list of items (which would be hidden somewhere in the code):
ABC Warehouse
Another Store
Best Buy
Barney's
Circuit City

I want the input box to be auto-filled as the user starts typing a customer name in it. For example:

If the user types an "a" in the field, a script would automatically fill in the box with ABC Warehouse (since it would alphabetically be the first "a" entry). But if the user then types an "n", then it would fill in "Another Store".

This is a basic concept in a lot of programs. I'm just wondering if there is a script to do it in a web browser.

ddadmin
12-12-2006, 03:59 AM
Basically what you want is a type ahead text box sort of widget. Try doing a search on Google (http://www.google.com/search?sourceid=navclient-ff&ie=UTF-8&rlz=1B2GGGL_enCA177&q=type+ahead+text+box) for it.