Simon Willison’s Weblog

Subscribe

Auto-complete text boxes

20th September 2003

There’s a great new article up on Sitepoint describing a technique for adding auto-complete functionality to normal HTML text input fields using Javascript. The code uses a whole bunch of browser-specific code, but it has to thanks to the unconsistent ways in which different browsers handle text selection ranges. Unfortunately the article doesn’t actually provide a demo of the code in action, so I’ve posted one here. It’s a very nice effect.

This is Auto-complete text boxes by Simon Willison, posted on 20th September 2003.

Next: "Interactive Tabular Data"

Previous: The pirate's code

Previously hosted at http://simon.incutio.com/archive/2003/09/20/autoComplete