Data Not Filtering in Jquery Autocomplete
<p>I've followed the examples <a href="http://jqueryui.com/autocomplete/" rel="nofollow noreferrer">http://jqueryui.com/autocomplete/</a></p>

<p>but instead of a fixed array I wanted a dynamic array from a database</p>

<p>I've almost got it working but as I type it won't filter the results and even if I type a letter that doesnt exist in the array, it still shows the full list.</p>

<p><a href="https://i.stack.imgur.com/Y6GbF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y6GbF.png" alt="enter image description here"></a></p>

<p><strong>search.asp</strong></p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
 &lt;meta charset="utf-8"&gt;
&lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
&lt;title&gt;jQuery UI Autocomplete - Default functionality&lt;/title&gt;
&lt;link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css"&gt;
&lt;link rel="stylesheet" href="/resources/demos/style.css"&gt;
&lt;script src="https://code.jquery.com/jquery-1.12.4.js"&gt;&lt;/script&gt;
&lt;script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(function() {
$("#tags").autocomplete({
  source: 'http://fullurl/autocomplete.asp'
});
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div class="ui-widget"&gt;
&lt;label for="tags"&gt;Tags: &lt;/label&gt;
&lt;input id="tags"&gt;
&lt;/div&gt;
</code></pre>

<p>
</p>

<p><strong>autocomplete.asp</strong></p>

<pre><code>&lt;%
sConn = "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=SERVER; Port=3306; DATABASE=database; UID=username;PASSWORD=password; OPTION=3"     
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open sConn

sSQL = "SELECT * FROM makes ORDER BY makes ASC;"

Set rst = Server.CreateObject("ADODB.Recordset")
rst.CursorLocation = 3
rst.Open sSQL, Conn, 3, 1

output = "["

DO Until rst.EOF
output = output &amp; chr(34) &amp; rst("makes") &amp; chr(34) &amp; ","
rst.movenext
Loop

output = left(output,(len(output)-1))
output = output &amp; "]"

Response.Write output

rst.close
Conn.Close
%&gt;
</code></pre>

<p>This is the result of autocomplete.asp: ["ACER","DELL","HP","LENOVO","SONY"]</p>

<p>any ideas what I've done wrong or missed out</p>