Javascript

Hello

I have a controller which executes a “render :partial” to actualise part
of my web page (a

object). When I do that I would like to call a
javascript function to complete my process.
How can I do that?
Anyone could help me?
Thanks
Regards

Hello Paulo,

I’m new to RoR, but it seems to me that remote_function() from
ActionView::Helpers::PrototypeHelper will help you.

http://rails.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper.html#M000540

On 10/16/07, Paulo C. [email protected] wrote:

Hello

I have a controller which executes a “render :partial” to actualise part
of my web page (a

object). When I do that I would like to call a
javascript function to complete my process.
How can I do that?

Well, if you want to insert some javascript in your partial, you can
write out a tag, or (better), use the
javascript_tag() helper:

<%= javascript_tag “some_js_func();” %>

That will insert a tag to call the function.

Is that what you want, or are you looking for something else?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs