jQuery makes it very easy to add this feature:
- Download the autocomplete extension for jQuery. You'll need both the javascript and CSS files.
- Add an input field to your form:
- Set the cacheLength option to speed up responsiveness: options={cacheLength: "20"};
- Call the autocomplete extension: $("#youAutocompleteMe").autocomplete(url, options);
- You'll need a server-side script installed at the url you pass to autocomplete to return matches.
That's it! It's pretty easy. The key to performance is setting that cacheLength parameter as it default to 1, which doesn't provide much caching at all.