Autocomplete in html page using jquery

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>jQuery UI Autocomplete - Default functionality</title>
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>   
    <script>
        $(function () {
            questionnaires = [];
            var data = 'asas,wew,asdasd,sdfsd,eeewew,Test Survey,Test Title,Testasif1,Sports Questionnaire,IT Questionnaire,REvive Test,ASSD,dasd,dasd,sdf,hello2,abc,test QUES2,hello3,test101,helolo,Questionnaire5,testone,DotNet,TodayQuestion,The Johnson Family,Testing 101,Testing 101,Testing 1017,Testing 1012,a,we,sdasdf,dfgsdf,aa,aaa,aaa,a,a1,NewTest101,None,Test 102,MyFirstQuestionnaire,HealthSurvey,cxvx,New Check Qst,h zdvcs ert df 18,h z10s ert df 18 ghj,safdxcfvx sf dfgdfg fghf,safdx xcvfvx sf dfgdfg fghf,Hello,Hello,qweasdzxc,Hello Test, gbhjmbghjm dfghbdfch,Amit Self Qst,Demo,All Types Questions,Check Boxes Questions,Amit21102015B,Amit21102015C,Error Testing,Sequence test,More testing,TESTPAQ,AGAINTEST,TESTINGPAQ,QuestionCompleted,QuestionCompletednew,TestSave,TESTING PIE CHART,TestingPIEChart,TestingPieChartN,t,y1,create html test,test html,html testt,html test f,xdht,tg,s,youtest,test,TEST complete q,Q,test survey WIDGET,test surveyf,Test q list1,loif,test eleven,Widgets test,widgets test2,widget test14,Widget sequence,widget sequence new,wid seq,SAMPLE PAQ,SAMPLE PAQ1,mindset survey,AKSHITA TEST,dfftrg,dqqqqq,Linden Road Primary School,linden road academy,assign,abcdefg,tryugfhvgh,Questionnaire Basic Details,Questionnaire Basic Details111,Amit Sample,Text length test,Length1,lengh,len,tyyt,lennn,Test progress,test complete,widget14,Pie Chart Testing,Check Test,Test comma , in Questionnaire';
            var arr = data.split(',');
            for (var i = 0; i < arr.length; i++) {
                questionnaires.push(arr[i]);
            }           
            $("#tags").autocomplete({
                source: questionnaires
            });
        });
    </script>
</head>
<body>

    <div class="ui-widget">
        <label for="tags">Tags: </label>
        <input id="tags">
    </div>


</body>
</html>

Comments

Popular posts from this blog

Form submit resulting in “InvalidDataException: Form value count limit 1024 exceeded.” In ASP.NET Core

Calculate Dynamic Current Calendar / Financial Year In C#

Repository Design Pattern in C#