Answer the question
In order to leave comments, you need to log in
Live search when typing a query on a page?
It is necessary to implement a search for tags on the page when typing like Khabrovsky or Google: we start typing, after 2-3 characters a list of suitable options falls out. On it you can run the cursor using the keyboard or poke the mouse. Tags are entered separated by a separator (comma).
On the page I decided to use mootools. I myself have already written 3 lines in js (this is my first js code in my life).
We need an option when the entire list of tags is loaded when the page is loaded (when it is small) and when a json request is sent to the server when typing. There is no ready-made solution in mootools itself. Do you advise something? I don't want to reinvent the wheel. Yes, and it's long. At least what is this functionality properly called?
Answer the question
In order to leave comments, you need to log in
For mootools I use davidwalsh.name/mootools-jquery-textbox-list. Of course, it is not quite auto-compote in the classical sense, but with minimal work with a file, it turns into it
Recently I jumped like a “startup” habrahabr.ru/blogs/startup/110509/
Maybe it will be useful to you, since you are talking with JS for the first time.
Drupal comes with a jQuery autocomplete plugin, I think you should check it out.
This great thing comes out of the jQuery UI box: jqueryui.com/demos/autocomplete/#remote-with-cache
Autocomplete with a predefined list, with JSON loading, with caching, with an example for tags separated by commas. I have enough. The only negative for you is not mootols =)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question