I am sure this has been asked a ton of times, but would appreciate some assistance.
I am trying to setup the jQuery UI, which I can get a static result list with from JSON. But I need to pass my INPUT value onto the PHP script to that it can actually filter the results.
My Code for the Input Field
<input id="search" />
My Code for running my Javascript
$("#search").autocomplete({
source: 'testData.php',
dataType: 'json',
minLength: 2,
select: function(event, ui) {
$('#contactId').val(ui.item.id);
$('#contactName').val(ui.item.value);
}
});
And testData.php is returning valid JSON data. But I don't know how to pass the variable from the input field to my testData.php so that it actually knows what to search for.
Hope this makes sense.