I am using Ruby on Rails.
I want to create a filter field on the page so that whenever the value of the input field changes, I filter the list shown below through ajax. (Exaclty, like user search, works in Stackoverflow)
I currently run it using form_remote_tag containing text_field_tag and submit_tag, and it filters my list when I click the submit button. I would like to remove the submit button and filter every time the value of the text input changes. How can I initiate a form submission every time the text in the input field changes?
I tried in my form
<%= text_field_tag (:filter), "" , :onchange => "alert ('This is a Javascript Alert')" %>
to receive the onchange event, but somehow this warning does not appear ...
source
share