Yes and no. The javascript clearly cannot be evaluated at the time
that the <%= is evaluated, since that happens server side.
However, the remote_function family do take a :with option, which is a
string of javascript to be executed and bashed into the parameters
when the ajax call is made. I wrote up some of the ways of playing
with the :with option at
Conversely,
can the remote_function(options) call be made from javascript.
remote_function just generates some javascript, usually something like
new Ajax.Updater(‘some_div’, /foo/bar, {some: options}
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.