I'm using Jorn's Autocomplete plugin and am successfully using it to return a list of users along with a user_ID. What I'd like to do now is when the user selects a person from the autocomplete list - via Ajax take that user_ID, populate a table in my database and return another value .
Right now I have: $("#personIDdisplay").result(function(event, data, formatted) { if (data) $('#personID').val(data[1]); }); This populates a hidden field (personID) with the value returned via autocomplete. What I'd like to do is instead that that value (data[1]) and use it to make another Ajax call to run a query and then return another value - but now sure exactly how to do that? :) Is it just a matter of sticking in a ajax call and doing something like this?? (psuedo code) $("#personIDdisplay").result(function(event, data, formatted) { if (data) $.ajax({ url: "dosomething.cfm", data: "id = .val(data[1]) ", success: function (data) { $('#personID').val(data); } }); I'm off to tinker but any feedback would be appreciated! Thanks, Jim