So, one of the solutions to the problem (this method only helped me, I describe it):
Used libraries jquery-ui.css, jquery-1.10.2.js, Jquery-ui.js NO header !!!
We have the main file, let it be named - index.php, and the file 200.php in which sql query and connections to the database and the output echo json_encode ($ data) is your variable. Next in index.php, when you click on the button, we include include_once (your_path \ 200.php); enough in body And now the important thing is Ajax autocomplete with URL parameters: '200.php', type: 'post', dataType: 'json', data: { quest: request.term} Next, we only write
success: function(data) { Response($.map(data,function(item) { return { label: item.label, value: item.value} })); },
And for displaying data from success this is select: function(event,ui) { ui.label; ui.value;} select: function(event,ui) { ui.label; ui.value;} Everything will work, if you have any questions write me together let's analyze
source code. Click, see all the code used for the script. Well and so, now and here I’m going to let down, but it will be an extra copy - paste - Vasily Barbashev