I am experiencing some challenges getting my autocomplete box to populate.
I am sending multiple parameters to the source. My current attempt ...
$("#questionBox").autocomplete({
source: function(request, response) {
$.ajax({
url: "csvAPI.php",
dataType: "json",
data: {
term: request.term,
discipline: $("#disciplineNameSelect option:selected").text(),
questionType: $("#questionTypeSelect option:selected").text(),
surveyTitle: $("#surveyTitleSelect option:selected").text()
},
success: function(data) {
response(data);
}
});
},
You can see the source url does work with the parameters sent ...
Any suggestions on how to get this to work? I have tried many different variations. I can get it to work when I define the source choices manually. But I need it to be dynamic with 4 parameters sent.
Thanks!