0

i am trying to use autocomplete function in my jsp page, but it display items is not perfect match given letter.

now i am display state using auto complete,

i had jquery as,

states.push(stateslist);
$( "#state" ).autocomplete({
source: states
});

html code:

<div class="ui-widget">
<label for="state">states: </label>
<input id="state">
</div>

but the textbox display not correct manner that like as,enter image description here

A J
  • 2,112
  • 15
  • 24
G D
  • 47
  • 8
  • in given example you want states that starts with "ta"? – A J Mar 26 '14 at 19:58
  • are you saying you only want the items to appear if they match the left side of the string instead of any part of the string? if so, this thread will help. http://stackoverflow.com/questions/3148195/jquery-ui-autocomplete-use-startswith – Chris Brickhouse Mar 26 '14 at 19:59

0 Answers0