Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    92
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Facebook search and drop-down

    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!

  • #2
    New Coder
    Join Date
    May 2009
    Posts
    92
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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?

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,990
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •