Email This Post
Print This Post
AutoComplete
Wed, Oct 10, 2007 – 11:54 amIntroduction
Treat a forms input textbox like a drop down menu or like a standard text box with built in auto complete features!
This is a JavaScript function which has been designed to be easy to incorporate into existing online forms. It acts as an HTML control that integrates AutoComplete into the standard textbox. Adding a few lines of code allows you to turn any standard textbox into a user friendly feature which can function as an input textbox or as a drop down select menue.
How it works
Whenever the user types anything in the textbox, the onkeyup event is fired, and the script calls a function. The current text in the textbox is then compared with an array that contains the list of allowed values.
Additionally the user can click on the convenient drop down menu button at any tme to treat the textbox like any traditional form select menu.
For further information please check out the working demo by clicking on the link below