My "observer" is blind

Any body have an idea why my first attempt to use “observe_field” isn’t
working?

<%= start_form_tag(:name => ‘my_form’, :controller => ‘boo’ , :action =>
‘ya’) %>
<%= radio_button_tag(‘foo’, ‘true’, checked = true) %>
<%= radio_button_tag(‘foo’, ‘false’, checked = false) %>
<%= submit_tag ‘do it now’ %>
<%= end_form_tag %>
<%= observe_field(“foo”, :url => {:action => “the_radio_thing”}) %>

I put a logger message in “the_radio_thing”, and…nothing. Also not
hitting the .rjs file of the same name. There are no error messages in
the log either when rendering the page or when poking the radio buttons.

Any ideas?

thanks,
jp

Hi Jeff,

Jeff P. wrote:

Any body have an idea why my first attempt to use
“observe_field” isn’t working?

First thing I’d do is try moving the call inside the form. Second thing
would be to look at what’s / whether or not anything’s being posted via
the
observe_field when the radio button changes. I don’t recall whether
radio
buttons trigger observe_field onchange or on some other event and you
might
want to check the docs on that.

hth,
Bill

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs