:update to a list

I have this list and what I want to do is to have a link that allows the
user to add something to this list. So I have a form with the :update
option, but I want the update to happen at the end of this div that I
have set aside for this list. I don’t remember how to use :update and
tell it to add at the end of the list. Or is it done with render? Can
anyone help, Thanks,

-S

On 10/11/07, Shandy N. [email protected] wrote:

I have this list and what I want to do is to have a link that allows the
user to add something to this list. So I have a form with the :update
option, but I want the update to happen at the end of this div that I
have set aside for this list. I don’t remember how to use :update and
tell it to add at the end of the list. Or is it done with render? Can
anyone help, Thanks,

If you use :update in your link_to_remote or remote_form_for, you need
to redraw the entire list. If you want to just add something to the
bottom of the list, you leave off :update and do an RJS response
(either a .rjs template or render :update do |page| … end)

On 11 Oct 2007, at 20:22, Shandy N. wrote:

I have this list and what I want to do is to have a link that
allows the
user to add something to this list. So I have a form with the :update
option, but I want the update to happen at the end of this div that I
have set aside for this list. I don’t remember how to use :update and
tell it to add at the end of the list. Or is it done with render? Can
anyone help, Thanks,

<% remote_form_for …, :update => ‘list’, :position => ‘bottom’ %>

Fred

<% remote_form_for …, :update => ‘list’, :position => ‘bottom’ %>

Fred

That’s it Fred, thank you, works just like I want.

-S

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