Reputation: 1467
I'm using Devbridge / jquery autocomplete.
i have been trying to send additional parameters in ajax using its option params
which is listed In manual
Issue : it does not send the correct input values to ajax request. Instead it sends initial state value of form inputs except the autocomplete input. ( you can check that in console )
i have tired to reproduce the same Here in Fiddle.
other thing i tried is
onSearchStart: function (query) {
$('#doc').autocomplete().setOptions({params :$("form").serialize()});
}
From manual
onSearchStart: function (query) {}
called before ajax request. this is bound to input element.
Upvotes: 0
Views: 1874
Reputation: 547
The 'params' parameter has to be an object:
onSearchStart: function (query) {
$('#doc').autocomplete().setOptions({params: {parameterA: $("form").serialize()}});
}
Upvotes: 1