Click to See Complete Forum and Search --> : AutoComplete/AutoSuggest


thespecialone
10-10-2008, 03:44 AM
I'm trying to find a AutoComplete/AutoSuggest script that will display the following in the drop menu:

City<br>
Country
--------------------
i.e:

London,
England

New York City,
United States of America

Paris,
France

--------------------

But when selected the user selects the city the script must only show "City" in the input box (i.e. London NOT London, England). I need the Country so the user knows that they are selecting the appropriate City, but do not need Country as part of my search parameters.

Thanks for any wisdom you may share.

sunnychotai
10-10-2008, 04:50 AM
Not sure whatyou mean by autosuggest\autocomplete. Can you elaborate?

What is the source of this info? Database\file? Code sample will help.

thespecialone
10-10-2008, 04:52 AM
mysql database...by autosuggest I mean an ajax window that drops showing you similar matches in the database to what the user is typing.

sunnychotai
10-10-2008, 04:56 AM
Not too sure about AJAX - my initial thoughts would be to populate an array with the value being a unique id (primary key) and the text as being just hte city.

Once the user selects the city the country\other details can be queried from the database using the primary key...

cyberjorge
10-10-2008, 05:19 AM
Hi thespecialone,

Take a look at these links, it should help.

http://nodstrum.com/2007/09/19/autocompleter/
http://www.brandspankingnew.net/archive/2007/02/ajax_auto_suggest_v2.html

I keep getting those when I'm searching for dropdown search function which on my way to resolving it after receiving help from sunnychotai.

Hope it helps.

thespecialone
10-16-2008, 05:40 AM
Thank you very much cyberjorge, those links really really helped!! Finally tweaked the auto suggest to my needs.

cyberjorge
10-19-2008, 07:45 PM
You are most welcome thespecialone :)