Search


Change Language


Ajax Downloads Home
Free AJAX Scripts by Freeajaxscripts.net
AutoSuggest: An AJAX auto-complete text field - AJAX Script

The AutoSuggest class adds a pulldown menu of suggested values to a text field. The user can either click directly on a suggestion to enter it into the field, or navigate the list using the up and down arrow keys, selecting a value using the enter key. The values for the suggestion list are to provided as XML, or as JSON (by a PHP script, or similar).

The results of the first request are cached on the client machine and are filtered as the user continues to type, to reduce the number of requests hitting the server.

In the JSON example above a callback function is passed to the autoSuggest instance. It is called when the user selects an entry, and inserts the entry id into a hidden field (visible for this example).

In the XML example below supplementary information is being displayed along with the names, in this case an english county.

 



Contact Owner
From:
Your Name:
Your E-mail:
Message:
Loans Mortgage insurance Loans Gas Electricity Web Games
There are 221 free ajax scripts and 31 categories in our directory





Lost Password?
No account yet? Register
We have 10 guests online