I have a page that has a text field on it which in turn has an
observe_field hooked up to it. As the user types in the field, a list
of items on the page gets filtered by that entry. This all works fine.
On the same page, I also have a hidden div that sometimes gets ajaxed
into view using the following:
render :update do |page|
page[‘item_name’].value = ‘’
page.visual_effect :appear,‘add_item_panel’, :duration => 0.5
User types in this newly visible text field and then hits an ajax done
button which “un-appears” the add_item div.
Now that that div is gone, the filter field mentioned at the beginning
of this post no longer makes the observe_field action happen. You can
type stuff in that field, and it has focus etc. Acts normally in all
ways except that it no longer seems to have an observe_field hooked to
The “hidden” div has a form_remote_tag in it to enable the use of the
add_item text field. I’m guessing that this other form coming into play
is hosing up the observe field for the original form on the main page.