If I understand your question correctly, RJS will make this a snap. The
new RJS is wickedly cool - give it a whirl. Here''s some docs:
- http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates
- http://scottraymond.net/articles/2005/12/01/
real-world-rails-rjs-templates
Here''s some code I wrote recently for my new Mac Password Manager:
render :update do |page|
if saved
page.hide "form"
page.replace_html "status", ''Thank you! Your message
has been sent.''
else
page.replace_html "status", ''Please enter the
message.''
end
end
You can do all sorts of cool things with that "page" object, including
visual effects a-la script.aculo.us. See http://api.rubyonrails.org/
classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/
GeneratorMethods.html for details.
HTH.
On Friday, June 02, 2006, at 10:15 PM, zven wrote:>Hello.
>
>Is it possible to update multiple DIVs during? For example I have DIV
>for @flash[:notice], and one for content and I need to render both DIVs
>after executing action.
>
>
>_______________________________________________
>Rails mailing list
>Rails@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails
Cheers!
--Dave Teare
http://1passwd.com - Password Manager + AutoFill for Mac OS X
http://devlists.com - Email list management
http://palmsphere.com - Apps for your hand-held
--
Posted with http://DevLists.com. Sign up and save your mailbox.