Forum: Ruby on Rails Using Ajax to do more than 1 render

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.
paul.vudmaska (Guest)
on 2005-12-02 16:06
(Received via mailing list)
In response to vivek : Using Ajax to do more than 1 render

>>some way to update multiple portions of a web page.
Sure, all kinds of ways - using dhtml and ajax -

>> but Iam kind of clueless about how to acheive the second update.Any ideas?
This might get you started - Ajax.Updater...

>>But I want the text box to appear only when a link
>>is clicked and also provide a link to hide it.I suspect i need to write some
>>javascript here but I just want to know how far rails can take me.

Perhaps something like this?
<div id="something"><%=text_field 'user','something'%></div>

<a href="#" onclick="Element.hide('something')">Hide</a>
 <a href="#" onclick="'something')">Show</a>

 <a href="#" onclick="Element.toggle('something')">Flipper</a>

Something like that :P
This topic is locked and can not be replied to.