Difference between revisions of "AutocompleteControl"
Jump to navigation
Jump to search
(Created page with "<pre> <script type="text/javascript"> var programLangs = [ "ActionScript", "AppleScript", "ASP.NET", "BASIC",...") |
|||
Line 60: | Line 60: | ||
</body> | </body> | ||
</pre> | </pre> | ||
[[Widgets]] |
Revision as of 17:47, 6 January 2017
<script type="text/javascript"> var programLangs = [ "ActionScript", "AppleScript", "ASP.NET", "BASIC", "C", "C++", "C#", "COBOL", "Dart", "Erlang", "Fortran", "Go", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby" ]; $("document").ready(function() { $("#auto1").autocomplete({ source: programLangs, autoFocus: true }); function getData(req, callback){ var result =[]; for(var i=0; i < programLangs.length; i++){ if(programLangs[i].substring) } }; }); </script> <style> /* the .ui class is predefined in the jquery library. this just overwrites it.*/ .ui-autocomplete { max-height: 200px; overflow-y: auto; overflow-x: hidden; } </style> </head> <body> <form> <h1>Using the Autocomplete Control</h1> <p>The autocomplete control provides suggestions to the user as they enter data into a field. This can be used to speed up data entry, guide the user toward entering a set of known default values, etc.</p> <p>The list of suggestions can come from an array, a URL, or a function that you supply that can retrieve the data from wherever your application desires.</p> <h3>Basic Autocomplete control</h3> <label>Type the name of a programming language: </label><input id="auto1" type="text" /> </form> </body>