JQuery, ajax, php, msyql: input auto suggestion form

I have a mysql db table that has every city, state, zip code, lat, long. On my site page I have an input form for cities. As the user enters, I would suggest a city, state. What current methods / techniques are good? (Limitations: jQuery, PHP, MYSQL)

Decision

+7
source share
2 answers

jQuery UI has a nice autocomplete feature.

JQuery UI Autocomplete

It is quite configurable. You must send the data in JSON format from the server, Autocomplete will mainly process the rest. Check documents.

+3
source

you can try an existing plugin, for example:

http://code.drewwilson.com/entry/autosuggest-jquery-plugin

It looks like it uses ajax and JSON to get data from your server. All styles are also performed in CSS: o)

0
source

All Articles