Observe_field(s) on a set of radio_button

Hi All

I have a form in which there are …

  • a text entry

  • a set of radio buttons

  • a select (menu drop down thing)

    When one of the radio button is selected the ‘select / menu drop down’
    is updated. I’m using an ‘observe_field’ - one for each radio_button.
    Everything is working fine - except it only works for one selection
    per radio button. Once a specific radio button has been selected - the
    ‘ajax updating’ of the ‘select / menu drop down’ stops working as a
    result of the method in the control not being called.

    There is a succinct description of the problem - here …

      With respect to the 'thoughtstoblog' post - I don't understand

what is being proposed as solution .

    I've also seen some references to workarounds on this listserv
  • but to be honest, I’m a bit confused as to what exactly is being
    proposed. If its not already obvious - I’m new to Rails.

     Any help/tips/pointers/references would be greatly appreciated


p.s. For the sake of completeness - here are some code snippets.

Note: FWIW -adding ':on => ‘click’ as an option to ‘observe_field’
doesn’t help


Select your service type:
<p><%= radio_button :lineup, :choice, "cab", :id => "cab_id" %>


<%= radio_button :lineup, :choice, “sat”, :id => “sat_id” %>

<%= radio_button :lineup, :choice, “ant”, :id => “ant_id” %>
Rabbit Ears

<%= observe_field ‘cab_id’,
:update => “ajaxWrapper”,
:url => {:action => ‘getprovider’},
:with => ‘selectedlineup’

<%= observe_field 'sat_id',
                :update     => "ajaxWrapper",
    :url       => {:action => 'getprovider'},
    :with    => 'selectedlineup'

<%= observe_field 'ant_id',
                :update     => "ajaxWrapper",
    :url       => {:action => 'getprovider'},
    :with    => 'selectedlineup'


def getprovider

@service = params[:selectedlineup]

if @service == 'cab'
  @providers = ['cable lineups']

if @service == 'sat'
  @providers = ['satellite lineups']

if @service == 'ant'
  @providers = ['antenna lineups']

render(:layout => false)