Combining Erb and RJS

Heres the thing. I want to render a page with standard .rhtml and I
want to do some RJS style effects on the same page.

Inline RJS doesnt work. I cant do a
render :rjs

Obviously I know it can be done… simple example of what I want to do
is what basecamp does… on adding a message, it does a visual_effect
on the new message.

What am I missing?

Rajesh

On Mar 13, 12:53 pm, “K. Rajesh” [email protected] wrote:

Heres the thing. I want to render a page with standard .rhtml and I
want to do some RJS style effects on the same page.

Inline RJS doesnt work. I cant do a
render :rjs

You can use the Scriptaculous helpers:

http://api.rubyonrails.com/classes/ActionView/Helpers/ScriptaculousHelper.html

to put raw JavaScript for visual effects straight into your RHTML
templates:

<%= visual_effect(…) %>

You’ll want to wrap this code in tags, or put it
in an onload, or something like that.

Chris

Thanks Chris… peach.

Rajesh