- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHi,
I have a form which has many fields. In one of them I want to have a field for a drop down list/textbox where user can use auto complete ajax library to suggest things from another file.
The other file has different columns and auto complete should be able to read from any column.
The file structure is like this:
Airport ID, Name, City, Country
SFO, San Francisco Airport, San Francisco, USA
So if a user insert SFO or USA or Airport name or city, this line has to appear in the drop down list.
Please suggest a script that I can use to be embedded in my website.
AXE
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: StraySodPosted on 2009-03-03 at 05:53:55ID: 23783688
Here are a few autocomplete scripts http://www.ajaxdaddy.com/. I didn't check it out, but since they all has to use AJAX and call i.e. some php script to fetch the data for autocomplete box it depends only on how you compose the sql statement in it. i.e. "SELECT Airport_ID, Name, City, Country FROM table WHERE Airport_ID LIKE '{$prefix}%' OR Name LIKE '{$prefix}%' OR City LIKE '{$prefix}%' OR Country LIKE '{$prefix}%'". I think that LIKE operator doesn't use index (probably uses FULLTEXT index (only MyISAM engine)) so statement like this will be really slow on big tables. After fetching the result from database you should check every row and choose only columns matching $prefix.