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
    • 753
    Comment on it

    Below is the code for autocomplete using Jquery .

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

    Contains style classes for AUTOCOMPLETE

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

    Contains functions for AUTOCOMPLETE :

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

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

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

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

        var empNames = [
        "Amit",
        "Aman",
        "Raman",
        "Brijesh",
        "Rakesh",
        "Akshay",
        "Arohi",
        "Sita",
        "Saumya",
        "Deepak",
        "Shailesh",
        "Arpit"];
    $( "#names" ).autocomplete({
        source: empNames
        });
    });
    </script>
    </head>
    
    <body>
    <div class="ui-widget">
    <label for="names">Emp Names: </label>
    <input id="names">
    </div>
    </body>
    </html>
    

 1 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: