Click here to Skip to main content
11,790,904 members (65,068 online)
Rate this: bad
Please Sign up or sign in to vote.
Hi there,

I am creating an application in I have a database connected to it. The database contains a lot of information for example users, vendors etc. Currently I have a dropdown menu which is just too long to be doing through it just to find the vendor you want. Now I want to create a search box so that when I want to get a specific vendor (I already have all the vendors details on the database such as address and contacts) I want to start typing the vendors name and I want it to look in the database then start giving me matching data to what I m typing to what already exists.

For example, when you do a search on google, normally it will start giving you matches to what you typing in or something similar to what you have already searched for. I wonder if anyone knows how to do it in and MySQL that would be helpful.

Thanks in advance!
Posted 7-Apr-12 21:08pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

jQuery has a lot of plug-ins available for doing autocomplete searches. Just search google for jQuery autocomplete or you can use the jQuery autocomplete at[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Jquery plugins available for this.

you can use $.autocomplete() to searching records.
link :

AJAX autocomplete for JQUERY
link :

another way is Autocomplete Extender of AJAX.

link :
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

try following this link...

make a web service for this..if you cant then contact me..I will send you the sample code[^]
Geofferz at 16-Apr-12 6:01am
Hey, thanks for your help. I would really appreciate a sample code if you can please! At the moment I just have a text box and I want that to be linked to my database so when user starts typing name of a customer it searches what already exists in the database and provide what matches to what they typing. Thanks again!
AshishChaudha at 16-Apr-12 6:13am
please provide me your email id
Geofferz at 17-Apr-12 5:00am
my email id is thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 410
1 ppolymorphe 385
2 Richard MacCutchan 118
3 Jochen Arndt 80
4 Maciej Los 70
0 OriginalGriff 1,329
1 Maciej Los 835
2 ppolymorphe 780
3 KrunalRohit 686
4 CPallini 661

Advertise | Privacy | Mobile
Web02 | 2.8.1509028.1 | Last Updated 10 Apr 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100