April 26, 2004

Autocomplete Textboxes

There is a great article over at Sitepoint about adding auto-complete functionality to normal HTML text-input fields. It uses Javascript, and a boat-load of browser-specific code, but that's unavoidable due to the fact that browsers suck. I didn't see a demo, which sucked. I wanted to see this in action. So did Simon Willison. And he's not lazy I am, so he went out and posted a demo on this. And it's a cool as I thought it would be.
Post Info

Tagged As HTML, Javascript

Comments are Open (1)

Posted at 08:11 AM

Comments

Ro

Back in the Netscape 4 days, I was asked to write a "combo box" CF module to help alleviate some of the known usability issues associated with browser select tags (For example, in a list of states, someone who lives in Maryland might first type an 'M' placing the focus on 'Maine' and then type an 'A' placing the focus on 'Alabama'. Ultimately, the user would submit 'Delaware' because 'D' was the last letter they had typed.)

The combo box idea was supposed to work much like this auto complete input field, except that it would auto select the most appropriate option as it dynamically rewrote the select tag.

To work, it required absolute positioning of both a select tag and its corresponding input component because the input field was to be cleverly layered on top of the select.

Needless to say, it was a mess of browser specific spaghetti which ultimately did more harm for layout and usability.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Search
Comments on this post
Categories
Info
Tony Stephens
Copyright © 1995-2005
Site Version:
10
Licensed:
Creative Commons
Validate:
XHTML, CSS, 508, RSS
Subscribe
Blog-Fu, Link-Fu