By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

How to create auto-complete j-query dropdown in a textbox as similar to google home

P: 2
HI,
Can anyone provide me better suggestion for (j-query autocomplete) or (javascript) autocomplete code in a textbox.Any of the code ,make sure it should be in textbox not a dropdownbox.

Thank You
Dec 17 '18 #1
Share this Question
Share on Google+
2 Replies


gits
Expert Mod 5K+
P: 5,235
what have you tried so far and with what exactly do you have problems with in your code?
Dec 19 '18 #2

P: 7
try to this code for autocomplete
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <title>Autocomplete</title>
  5.         <meta name="viewport" content="width=device-width initial-scale=1"> 
  6.  
  7.         <link href = "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css"
  8.         rel = "stylesheet">
  9.      <script src = "https://code.jquery.com/jquery-1.10.2.js"></script>
  10.      <script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
  11.         <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  12.  <script type="text/javascript">
  13.     $( function() {
  14.     var language = [
  15.       "ActionScript",
  16.       "AppleScript",
  17.       "Asp",
  18.       "BASIC",
  19.       "C",
  20.       "C++",
  21.       "Clojure",
  22.       "COBOL",
  23.       "ColdFusion",
  24.       "Erlang",
  25.       "Fortran",
  26.       "Groovy",
  27.       "Haskell",
  28.       "Java",
  29.       "JavaScript",
  30.       "Lisp",
  31.       "Perl",
  32.       "PHP",
  33.       "Python",
  34.       "Ruby",
  35.       "Scala",
  36.       "Scheme"
  37.     ];
  38.     $( "#tags" ).autocomplete({
  39.       source: language
  40.     });
  41.   } );
  42.   </script>
  43. </head>
  44. <body>
  45.  
  46. <div class="ui-widget">
  47.   <label for="tags">Tags: </label>
  48.   <input id="tags">
  49. </div>
  50.  
  51.  
  52. </body>
  53. </html>         
  54.  
4 Weeks Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.