Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dealing with huge data in select boxes

Hi I am using jQuery and retrieving "items" from one of my mySQL tables. I have around 20,000 "items" in that table and it is going to be used as a search parameter in my form. So basically they can search for "purchases" which contain that "item".

Now I need them to be able to select the "item" from a drop down list, but it takes pretty long to populate a drop down list with 20,000 "items". I was wondering if there was any jQuery plugin out there which supports pagination for drop down boxes with autocomplete.

That way the user can either start typing the first few letters have the list filtered, or just click on the arrow and see maybe 20 items, and the last is "Please click for more".

I am open to any other suggestion for dealing with huge dataset and populating HTML select boxes with said dataset.

There might be multiple select boxes on this search page where a user can select an "item" or a "customer" or anything along those lines and then click on "Search".

like image 742
Girish Dusane Avatar asked Feb 18 '11 00:02

Girish Dusane


1 Answers

With a dataset that large it's time to use Ajax...

check out these autocomplete plugins:

http://www.pengoworks.com/workshop/jquery/autocomplete.htm

and

http://code.google.com/p/jquery-autocomplete/

like image 102
jpstrikesback Avatar answered Oct 29 '22 22:10

jpstrikesback