Search code examples
jqueryjquery-pluginsautocompletedrop-down-menuautosuggest

autopopulate dropdown box based on suggestion jquery plugin


do you know a jQuery Autocomplete Plugin that has the following features. I have searched SO, but I can't seem to find what I'm looking for. So, here it is:

  1. A control that acts like a dropdown filter
  2. Except data for the dropdown filter is not populated on page load
  3. Data for the dropdown filters depends on what the user types on the input box
  4. Thus, there is an input box and autosuggested items are on an li
  5. If the user does not type anything or what he/she has typed doesn't match anything on the database, if will default to a value
  6. I call this a dropdown autosuggest not a dropdown filter. Because a dropdown filter already has items in it which you could filter by typing. A dropdown autosuggest populates the dropdown based on user input. I call this a dropdown because the user may not input freetext

This is the closest one I could get for now. http://wharsojo.wordpress.com/2008/02/18/jquery-facebook-autocomplete/ and this is multiple selection in which I only need one. The drop-down box doesn't seem to be configurable as I am planning to add the avatar and location of the user.


Solution

  • i would say, that you can achieve all this by using JQueryUI Autocomplete.

    1. Thats what it does
    2. Load Data via Ajax when a specific number of caracters has been entered
    3. Also part of the Ajax thing and serverside script
    4. Exactly the way it Works. Inputbox with attached ul
    5. You can check for this in the change-event of autocomplete
    6. Has no items, gets new Items after userinput.

    I hope this has helped you in some way.