I created dropdown autocomplete based on jq autocomplete.
So I want to get all values with empty textbox value.
I call this code:
element.autocomplete("search", element.val());
Where element.val() returns “”.
And nothing happens. No ajax queries.
What should I do to send ajax query with value “” to server using jquery ui autocomplete API?
Edited. It connected to the exist post – Jquery autocomplete "search" method
If I understand you correctly, you want the autocomplete drop-down to populate even when there is no content in the textbox. To do this, you have to have the
minLengthoption set to 0. Once you do that, to have the search window open on command (as opposed to when the user types something then erases it), your javascript ofelement.autocomplete("search", element.val())should work.