I have a regular text box that people type input to. On keyup, I want to do a like query in the db and see if there are any matches. If there are some matches, I want to display them as choices for the person to choose before they finish typing.
This would work just like in stackOverflow, the functionality for choosing tags works.
How can I do this? Right now I am returning the choice data encoded in json from my ajax to the jQuery code, but I don’t know how to loop through it and make it.
Include jQuery UI Autocomplete.
Check the documentation, it is fairly flexible and you can make it work almost however you like (such as what you described).