A Google link? Come on, man. Why even reply?
Phunky, there are autocomplete plugins. You can find them on this page:
http://docs.jquery.com/PluginsI've used and enhanced this one:
http://www.pengoworks.com/workshop/jquery/autocomplete.htmMy enhanced version includes the changes listed below. Let me know if you'd
like to use it!
Updates to jquery.autocomplete.js
- You can have a question mark in your Url (will use a & instead, in that
case).
- Responses are expected to be Json.
- If there are more results than the number to be displayed, an ellipsis is
shown.
- Added the option displayField. Whatever you specify for this option will
be the field that is displayed in the search results. The default is "id".
- Added the option valueField. Specify a string to use as the attribute to
use for the value of the field. The default is "id".
- Added the option formFieldForValue. Specify a string that matches the
field you want to use to store the value of the selected item. For example,
"#MyHiddenField".
- Took out the caching for now, because it was causing problems and I don't
currently think it's a good idea.
- Added the option onUnknownValueEntered, which is an event called when the
user enters a value that isn't found. The value entered is passed as a
parameter to the function you specify.
- The onItemSelect and onUnknownValueEntered callbacks pass the input field
to you as the second argument (the first being the li).
Bugfixes:
- Fixed a bug in moveSelect(step) that allowed an empty list (lis) to be
indexed into, even when the .length was 0.
- Fixed a bug which caused raw Html to be inserted into the autocompleted
field when tabbing when nothing was selected.
- In selectItem(li), I added a line that converts all of the Html entities
(e.g. &) to their textual counterparts (e.g. &).
Diego A. wrote:
>
>
> Start here:
>
http://www.google.co.uk/search?q=jquery+autocomplete&sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2006-14,GGGL:en>
>
> On Aug 30, 9:33 am, Phunky <
phunks...@gmail.com>