Rails AJAX选择框

I am trying to have an AJAX event for a <select> box that will do some action when the selection changes. The select box is embedded inside inside a table's <td> tags

<td>
  <%= form_tag '', { :id => 'test_form' } do %>
    <select name='repo' value="<%= session[:repo] %>" >
      <option></option>
        <%@repos.sort! { |a,b| a.repo <=> b.repo }
          @repos.each do |r| %>
            <option <%= session[:repo]==r.repo ? "selected='repo'" : '' %>>
              <%=URI.escape(r.repo)%>
            </option>
        <% end %>
    </select>
  <% end %>

  <%= observe_form( 'test_form', :frequency => 2, 
  :update => 'update_results', 
  :url => {:action => :update_report, :page => 0, :update => 1 }, 
  :loading => "$('res_spin').show()", :complete => "$('res_spin').hide()" ) %>
</td>

I have embedded the select box in a form and the observe_form method to listen for a selection change. My controller function is update_report that will do something when the selection changes. For some reason, when the selection changes, the controller function is not getting called at all.

Turned on "Firebug" and seeing this error a lot of times

    $(form) is null
    var elements = $(form).getElementsByTagName('*'),

Try observe_field (as discussed here):

<%= observe_field(:state, :url => { :action => :update_report, :page => 0, :update => 1 }, :update => :update_results, :with => 'repo' ) %>