pawelczak / EasyAutocomplete

JQuery autocomplete plugin
http://easyautocomplete.com
MIT License
729 stars 243 forks source link

Test plugin for $.ajax + POST #97

Closed pawelczak closed 8 years ago

tobybowers commented 8 years ago

I'm using the following for ajax post and it appears to work for the most part:

url: "/services/address/lookup?max=10", //stg/prod ajaxSettings: { dataType: 'json', method: 'POST', data: { 'country': 'NL', 'postCode': $("#application_add_zipCode").val() } },

The one issue i have is that I need to send the current value of the input field within the post data, I know we can put it in the get data but the webservice i'm using doesn't accept this. $("#application_add_zipCode").val() obviously won't work because it'll get the initial value of the input (i.e. empty).

Any suggestions?

pawelczak commented 8 years ago

I was not aware of this issue. Thanks for pointing it out. Initially I've thought, that it can be solved by closures, but it turned out differently. I need to think about the solution.