Auto Complete Function | JavaScriptSource

Auto Complete Function

JavaScriptSource Staff Sep 6, 2006


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:


Source Code

Paste this source code into the designated areas.

External file

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


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


Paste this code into the BODY section of your HTML document

Leave a Response


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