I am new to jQuery, so I will try to be as simple as possible.
I am writing an application in Classic ASP, and I need to autocomplete a textbox (named targetfilter2) with results from my state/country database.
The sql call is fine, and returns the valid data for the term: Ne
(show all states that begin with "Ne")
Here are the results from my SearchStates.asp:
[{label:'Arizona - United States',value:'5'},{label:'Arkansas - United States',value:'6'},{label:'Arunachal Pradesh - India',value:'235'},{label:'Arkhangelsk Oblast - Russia',value:'340'}];(5 being the statecode that I would like to put in option value of the selected item)
The javascript on my html page is:
<script> $(function() { $( "#targetfilter2" ).autocomplete({ source: "SearchStates.asp", minLength: 2 }); }); </script>and the text box is:
<input id="targetfilter2" name="targetfilter2" type="text" />When i type in the box, i briefly see the loading animation, but no results..
SearchStates.asp?term=Ne returns the results above...
I would appreciate any help anyone could give, as I have been racking my brain all morning...
Thanks,
-Chris