Forum: Ruby on Rails Can Ajax updates more than one <div>?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
14b7344777a56ac9a1fad849f5d6da2a?d=identicon&s=25 sayoyo Sayoyo (sayoyo)
on 2006-02-14 19:57
(Received via mailing list)

I wish to know, is it possible that Ajax can update
more than one zone "<div>"???? like :

<%= link_to_remote("Title", :update => 'mydiv0', :url
=> {:action=>:say_hello} )%>

<div id="mydiv0"> to be changed one</div>
<div id="mydiv0"> to be changed two</div>

When I execute the code, only the first line is
changed, the second one doesn't...

thanks you very much


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
Bc80625db60e9db4394c51d6c1892b49?d=identicon&s=25 Derrick Spell (Guest)
on 2006-02-14 20:03
(Received via mailing list)
The link_to_remote will only update one DOM element.  You may want to
look into RJS templates...they will allow you to do multiple updates
on a single AJAX call.

-Derrick Spell
C7407d9ae305656e88bc7935d4af9cbd?d=identicon&s=25 Jeff de Vries (Guest)
on 2006-02-14 20:16
(Received via mailing list)
There is a section in "Rails Recipes" that talks about using RJS to do
Ff82af3238a57fbd1212832ec1a19f28?d=identicon&s=25 Dylan Stamat (Guest)
on 2006-02-14 20:40
(Received via mailing list)
Ditto to both comments above.
I was looking for the exact same thing, and RJS seems to be one of the
sane ways to do this.
This topic is locked and can not be replied to.