...

View Full Version : Facebook search and drop-down



bfinke
05-27-2009, 11:31 PM
I am looking to replicate what Facebook uses for its searches.

For example, I want a user to select his/her school from a drop down list, but because there are thousands of schools, I want their search to be gradually refined with each letter they type. So as they type the third or fourth letter, the top 10 most relevant matches are listed in a drop-down below. The user than can click on the drop-down and the "id" value of their selection would become the value of that input field.

In more detail:

------------------------------
Database of Schools in mySql:

Apple University
April University
Apricot University

As the user types "Ap"... this shows up below the search box:

Apple University
April University
Apricot University

As the user types "Apr"... this shows up below the search box:

April University
Apricot University

As the user types "Apric"... this shows up below the search box:

Apricot University

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

Does this make sense?

I'm not very good with AJAX or Java, but I have to think someone else has thought this is cool (and functional) and has used it on their site -anyway I could get a copy of that code?

Thanks a LOT!

bfinke
05-28-2009, 09:36 PM
i know im asking a lot but does anyone have any leads? I just have no idea where to start with this -would this be something done in AJAX?

Philip M
05-29-2009, 08:12 AM
As you say, there are thousands of schools. I would suggest you start by breaking down the list by State, then by town/city. But I fear that you are trying to run before you can walk.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum