Forum: Ruby on Rails How to send post data with link_to_remote?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Chris K. (Guest)
on 2006-06-06 22:26

I'm trying to send a post body with my link_to_remote call.

Prototype supports the 'postBody' option, but I can't seem to get
link_to_remote to set that.

Here's what I'm trying:

link_to_remote 'move up',
   :url => { :controller => 'upload', :action => 'position_ajax', :id => },
   :method => 'post',
   :postBody => 'amount=-1'

But no dice.

I looked at the source for <a
and it looks like postBody is not in the supported options hash.

Or is the idea that I create a dummy form and associate the
link_to_remote with that?
Peter E. (Guest)
on 2006-06-07 15:42
(Received via mailing list)
Chris K. (Guest)
on 2006-06-07 18:38
Ah, :with. That looks good.

Now we just need this added to the docs. There's a little blurb on :with
in the API docs for observe_field...

Thanks Peter!
This topic is locked and can not be replied to.