I have a ruby on rails application with an input text field that has an autocomplete mechanism. This mechanism works like this
$(function() { if ($('#autocompleting_field').autocomplete) { function.... } });
No I want to call a controller action when this field changes
jQuery(function($) { $('#autocompleting_field').change(function() { call the controller });
Now I have the problem that the controller is called right at the moment that I type in some words in the field but not after I have selected something from the autocomplete mechanism
You have to bind your after function with
selectevent of autocomplete. Like this:Although I’m not sure why you use the
ifNote: assuming http://jqueryui.com/demos/autocomplete/ [Events->’select’]