I have a textbox on which i want to bind multiple autocomplete JSON da开发者_开发知识库ta. For example, if I type
Name:
the autocomplete data should display names of employees and after a delimeter (, OR ;) suppose I type
Department:
the autocomplete data should display options to select departments, so on and so forth. Any guidance as to how can this be achieved?
I like this jQuery autocomplete plugin. One of its features is, it can get its autocomplete data over AJAX. So it'll call your script (PHP or what have you) on the server and pass the current contents of the autocomplete text field as a parameter. From there, you can do whatever you want. Pick apart their text at whatever delimiter you choose, return whatever are sensible options for autocompletion, etc, etc. It's all in your hands at that point.
精彩评论