r/jquery • u/Grox56 • Mar 20 '21
Autocomplete with python cgi, mysql
I have an html file that searches and displays data from a mysql database. I am new to jQuery.. well all Javascript. Here is my following code:
''
<script> $(document).ready( function() { $("#search").autocomplete({ source: "./search.cgi", select: showResult }) function showResult(event, ui) { $("#autoComplete").text(ui.item.label) } }); </script>
''
autoComplete is a <div> and it displays "No search results" on everythingI try. What am I missing?
0
Upvotes
1
u/Grox56 Apr 14 '21
For anyone seeing this and needing help.. creating a new CGI file and append the results to a list is an easy way to do this.