Remote_function with local javascript variable

Hi list,

I’m trying to get a local javascript variable submitted with

The above snippet seems to be close but generates
new Ajax.Updater(‘foo’, ‘/temp/boo/1’, {asynchronous:true,
evalScripts:true, parameters:Form.serialize(‘local_variable’)})

but I don’t want the form to be serialized (there is no form!) I want
the value of ‘local_variable’ to be serialized and submitted.
Any ideas?


Maybe remote_function
with a :with parameter will help?


thanks - looks like this might do the trick:

remote_function :url => {:action => “boo”, :id=> 1},
:with =>

It looks like this appends &variable=blah to the URL which is enough
for me, but it would be interesting to see if it could serialise and
post variable values as well - maybe some other time!

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