I have a page with two input fields City and Place. I have a Devbridge autocomplete plugin that works fine for the city field. Now I want him to work on the venue. Javascript that I have so far:
<script type="text/javascript"> $(document).ready(function() { $('#Event_City').autocomplete({ serviceUrl: '<%=Url.Action("GetCities", "Search") %>', minChars:2, width: 300, delimiter: /(,|;)\s*/, deferRequestBy: 150, </script>
The second autocomplete passes an additional parameter (city) to the action on my controller. Then I will use this to limit my answers to places in this city. This parameter is received, but does not contain the current value entered in #Event_City. Instead, it contains a default value.
Does anyone know how to evaluate value when calling autocomplete?
I am just starting out with Javascript, so please be careful.
Thanks,
javascript jquery autocomplete asp.net-mvc
madcapnmckay
source share