Without the form_tag, everything's fine with IE 7.0. But with firefox
3.0.3, I don't even get a request. (javascript completely enabled)

<table cellpadding=10>
  <tr id='test'>
    <%= render :partial => 'test' %>
  </tr>
</table>

_test.html.erb:

    <td>
      <%= select_tag :select_number, options_for_select(['','1','2'],
selected = params[:value]),
        {:onchange => remote_function(:url => {:action
=> :select_number}, :with => "select_number")} %>
    </td>
    <td>
      selected: <%= params[:value] %>
    </td>


  def select_number
    render :update do |page|
      page.replace_html "test", :partial => "test"
    end
  end



And using page.replace with <tr id='test'> in the partial leads to
something like http://railsforum.com/viewtopic.php?id=21678

Luma



On 23 Okt., 14:32, tonypm <[EMAIL PROTECTED]> wrote:
> 1.  You don't need the form tag if you are only updating by ajax.
> Html purists might argue the point!
>
> 2.  You can use any element to update from a partial.  For example,
> give the tr an id as in:
> <tr id='update_me'>
> then in the controller,
> page.replace_html :update_me   etc.....
>
> 3.  Sometime I find it easier to include the <tr> tag in the partial
> itself, so that the whole row, not just the inner html gets replaced.
> In this case use page.replace :update_me in the controller.
>
> 4.  You may find if you get rid of the form tags, that updating
> individual <td>s may work, but I would be wary of it.
>
> hth Tonypm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to