jquery - Typeahead Bloodhound POST request -


I can not get a remote query to properly use POST. Replace: "../getcreditors", function: (url, query) {return url + "#" + query;}, ajax: {type: "post", data: $ .perm ({q: queryInput.val ( )})}}});

queryInput.val () does not receive the current value of the object, only the value of the time that the iron object is given immediately. How do I get query string in AJAX data options?

You can first use $ .ajax

  var Creditors = new bloodhound ({datumTokenizer: function (d) {return bloodhound.tokenizers.whitespace (d.value)}, querytochnizer: Bloodhound.tokenizers.whitespace, Remote: {url: "../getcreditors", Replace: Function (Url, query) {return url + "#" + query;}, ajax: {before: function: (jqXhr, settings) {settings.data = $. Param ({q: queryInput.val ()}}} , Type: "POST"}}});    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -