Auto Complete Function | JavaScriptSource

Auto Complete Function

JavaScriptSource Staff Sep 6, 2006

General

Create an auto-complete or auto-suggest text box in JavaScript, without use of prototype handlers and other advanced techniques. This script could be adapted for use in a number of different situations.


(Begin entering one of the names below)
Albert, Allen, Barry, Beth, Hal, Harry, Steve, Susan


Send e-mail to:

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: autoCompleteFunction.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(2 comments)

however its best to change it to allow sending of array and splitter /delimeter character to function call like i did, so that lists can be dynamically included using php or similar

bart bosma Jul 31, 2008

Simple, clear example. Showed exactly what I needed to do to accomplish what I was after. Thanks for an excellent post.

Rick Wannall Dec 28, 2007