this is a continuation from a previous JQueryUI Autocomplete question, I asked.
This time, I have my data returning ... but I have no idea how i define what
This code worked for me:
$( "#Textbox" ).autocomplete({
minLength: 2,
source: function( request, response ) {
var term = request.term;
if ( term in cache ) {
response( cache[ term ] );
return;
}
var currentProject=$("#project option:selected").text();
$.ajax({
url: "url",
data: {term : request.term, IssueType :'Test', Project : currentProject},
dataType: "json",
contentType: "application/json; charset=utf-8",
dataFilter: function(data) { return data; },
success: function (data) {
var results = $.map(data, function(item){
return { value: item.value, id: item.id }});
cache[request.term] = results; response(results); }
});
}
});