I have jQuery autocomplete setting in input field.
It works great.
However, I want to have a button that, when clicked, causes autocomplete, as if the user was entering text into the input. I would pass a specific string.
Any ideas on how I can do this?
JQuery UI autocompletion has a method search:
search
myAutocomplete.autocomplete('search', 'sometext');
This worked when #inputID- text input on which autocomplete is attached.
#inputID
$("#inputID").autocomplete('search');
Tested in FireFox and Chrome (Ubuntu 12.04 LTS)