I am trying to get an autocomplete similiar to: Here at jquery ui in their custom example.
This instead will use an ajax call instead of hard-coded data. I have two colu
In your $.ajax
call, you're not specifying a success
callback:
$.ajax({
url: 'ajax/jsonencode.php'+querystring,
beforeSend: function(){
alert("beforeSend");
},
async: true,
dataType: "json"
});
Since the widget expects you to invoke the response
function to supply the suggestions, you should do something like this:
$.ajax({
url: 'ajax/jsonencode.php'+querystring,
beforeSend: function(){
alert("beforeSend");
},
async: true,
dataType: "json",
success: response
});
That assumes your data has at least a label
or value
property.