Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Autocomplete using Jquery.

    • 0
    • 1
    • 1
    • 0
    • 1
    • 0
    • 0
    • 0
    • 777
    Comment on it

    Below is the code for autocomplete using Jquery .

    1. > <head> <meta charset="utf-8">
    2. > <title>Autocomplete using
    3. > jQuery</title> <link rel="stylesheet"

    Contains style classes for AUTOCOMPLETE

    1. > href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
    2. ><script src="http://code.jquery.com/jquery-1.9.1.js"></script>

    Contains functions for AUTOCOMPLETE :

    1. ><script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    2. ><script>

    'Autocomplete' provides suggestions when you type into the textbox, here which are stored in a JavaScript array.

    1. <p>$(function() {<br>

    BELOW ARRAY CONTAINS ALL THE NAMES TO DISPLAY ON AUTOCOMPLETE 'EMP NAME' TEXT BOX

    1. var empNames = [
    2. "Amit",
    3. "Aman",
    4. "Raman",
    5. "Brijesh",
    6. "Rakesh",
    7. "Akshay",
    8. "Arohi",
    9. "Sita",
    10. "Saumya",
    11. "Deepak",
    12. "Shailesh",
    13. "Arpit"];
    14. $( "#names" ).autocomplete({
    15. source: empNames
    16. });
    17. });
    18. </script>
    19. </head>
    20.  
    21. <body>
    22. <div class="ui-widget">
    23. <label for="names">Emp Names: </label>
    24. <input id="names">
    25. </div>
    26. </body>
    27. </html>

 1 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: