Click here to Skip to main content
15,845,212 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using jquery-ui-19.2 Autocomplete .I am getting the data from database and tring to see the list in input , but i am not able to select the item .Whenever i try to select the item the item list disappears.

<link rel="stylesheet" type="text/css" href="../static/css/jquery-ui-1.9.2.custom.css" />


<input type="text" id="TextBox1" />



<script type="text/javascript">

XML
<script src="../static/scripts/jquery-ui-1.9.2.custom.js" type="text/javascript"> </script>

<script src="../static/scripts/jquery-1.10.min.js" type="text/javascript"></script>




$(function()

{
var availableTags = [ <%= SuggestionList %> ];



$( "#TextBox1" ).autocomplete(


{
source: availableTags,
autofocus: true,

select: function(event, ui) {

$("#TextBox1").val(ui.item.value);


}


});


});
Posted

1 solution

Take a look into the below code and just set the source.

$( "#tags" ).autocomplete({
source: availableTags
});

http://jqueryui.com/autocomplete/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900