Auto-complete ; why jQuery put value of list choosen in all input text fieled

<%@page contentType=“text/html” pageEncoding=“UTF-8”%>

jQuery Autocomplete from Database in JSP - Onlyxcodes
    </style>
</head>

<body>    


    <div class="container">
        <label>Enter Country Name</label>
        <input type="text" id="txtCountry" onkeyup="lookup(txtCountry,showList1,'record.jsp');" class="form-control" placeholder="enter country name">
        <div id="showList1" style="position: absolute ;">
            <ul class="list-group">
            </ul>
        </div>
        <label>Enter age</label>
        <input type="text" id="txtCountry2" onkeyup="lookup(txtCountry2,showList2,'record.jsp');" class="form-control" placeholder="Enter age">
        <div id="showList2" style="position: absolute ;">
            <ul class="list-group2">
            </ul>
        </div>
        <label>Enter dfg</label>
        <input type="text" id="txtCountry3" onkeyup="lookup(txtCountry3,showList3,'record.jsp');" class="form-control" placeholder="Enter age">
        <div id="showList3" style="position: absolute ;">
            <ul class="list-group2">
            </ul>
        </div>
    </div>
</body>

Please do not create duplicate topics. Use the thread you already have open for this project. Thank you.

A post was merged into an existing topic: Autcomplete ; Other divs moving when list appears as dropdown