Click here to Skip to main content
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 22: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 Mika Wendelius 241
1 Abhinav S 155
2 Peter Leow 140
3 Sergey Alexandrovich Kryukov 135
4 Kornfeld Eliyahu Peter 115
0 Sergey Alexandrovich Kryukov 8,613
1 OriginalGriff 6,536
2 Peter Leow 3,727
3 Zoltán Zörgő 3,456
4 Richard MacCutchan 2,442

Advertise | Privacy | Mobile
Web04 | 2.8.150123.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