gerbdla1
(gerbdla)
December 12, 2011, 11:46pm
1
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])
end
can I do something like this?
hassan
(Hassan Schroeder)
December 13, 2011, 12:44am
3
maybe somebody can help me with this. I need to execute javascript on
the server side
Why?
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])
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.
HTH,
G_S_RAO
(G S RAO)
December 13, 2011, 4:50am
4
try this code
format.js {render :js => "alert('Yse Javascript working fine.');"}
Hi,
Anyone can help me how to give multiple search strings in imap_search function,
i tried with regular expression as follws, since i want to search all strings in Subject starting with alphabet “s”.
$emails = imap_search($inbox,“BODY Sp*”);
Kindly can u suggest any links on this multiple search
11155
(-- --)
December 13, 2011, 7:42am
6
Usha Murali wrote in post #1036452:
Hi,
Anyone can help me how to give multiple search strings in imap_search
function,
i tried with regular expression as follws, since i want to search all
strings in Subject starting with alphabet "s".
$emails = imap_search($inbox,"BODY Sp*");
Kindly can u suggest any links on this multiple search
Please do NOT hijack other posts and create a new post for this
question.
11155
(-- --)
December 13, 2011, 7:46am
7
subbarao wrote in post #1036442: