php - Make a scroll bar in my search javascript -


There is a problem in my search bar in my JavaScript because I have 2k + names stored in my table, called tb_applicants Is ... .if I type F or something like this I will give a very long list of names that I write ... I want to do this, a scroll bar is applied so that it is like a blanket for a long time .

Enter image details here

Current code:

gt; pre & lt; & Lt; Input type = "text" name = "search" id = "query" /> & Lt; / Form & gt; & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ("# query"). Autocomplete ({source: 'search.php', select: function (event, ui) {$ ("# query"). Html (ui .item value); } }); }); & Lt; / Script & gt;

search.php code:

  & lt ;? Php $ q = $ _GET ['word']; Mysql_connect ("localhost", "root", ""); Mysql_select_db ("Clayton"); $ Query = mysql_query ("tb_applicants where name is named '$ q%' 'border 5"); $ Data = array (); While ($ row = mysql_fetch_array ($ query)) {$ data [] = array ('value' = & gt; $ row ['name']); } Echo json_encode ($ data); ? & Gt;  

If you are using the jqueryUI plugin, then you need to set a maximum-height CSS Asset as explained:


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -