#execute javascript function here
_gaq.push([‘_trackEvent’,event_category ,event_label, event_action])
end
In the context of a page (even partial) render, you presumably want
to include JS that will be executed on the client, yes? What do you
expect the above line to accomplish?
But if you really want to execute some JS on the server side, pull it
out of that render action and look at the Johnson gem.
On Tuesday 13 December 2011 05:16 AM, gerbdla wrote:
#execute javascript function here
_gaq.push([‘_trackEvent’,event_category ,event_label, event_action])
end
can I do something like this?
try this code
format.js {render :js => “alert(‘Yse Javascript working fine.’);”}
This a nice railscast. You can see how you can create a js.erb file with
the same name of your method that will be executed as part of a js
format response:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.