On Tue, Dec 13, 2011 at 7:46 AM, gerbdla <gerb...@gmail.com> wrote: > > maybe somebody can help me with this. I need to execute javascript on > the server side > > > format.js do > render :update do |page| > page.insert_html :bottom, content_id, :partial => > "add_to_favorite_from_dashboard", :locals => {:object => > object, :favorite => favorite, :ftype => content_id}, :layout=>false > > #execute javascript function here > _gaq.push(['_trackEvent',event_category ,event_label, event_action]) >
you can use << page << 'alert("foo")' > end > > can I do something like this? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.