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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5af3b9ce700e50eb46001e0c9bc03f70?d=identicon&s=25 paul.vudmaska (Guest)
on 2005-12-02 15: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 - http://script.aculo.us/

>> but Iam kind of clueless about how to acheive the second update.Any ideas?
This might get you started - Ajax.Updater...
http://wiki.script.aculo.us/scriptaculous/show/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.

http://wiki.script.aculo.us/scriptaculous/show/Prototype

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

<a href="#" onclick="Element.hide('something')">Hide</a>
 <a href="#" onclick="Element.show('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.