Link_to_remote() - can I post data with it?


#1

can I post data with link_to_remote(),

link_to() has special option :post => true and viola

Thanks in advance


#2

You can serialize form elements by adding the :with => “Form.serialize(
‘form_id’ )” attribute to your link_to_remote tag. I’m sure there’s a
way
of serializing additional data, but I’m not sure what it is. You can
specify additional attributes in the :url => { :action => }
section,
but I’m a total newb and am not sure if those are sent via GET or POST
(I am
guessing they are sent via GET since they are associated with the URL
attribute).

-Will


#3

Hi,

On 1/17/06, Szczepan F. removed_email_address@domain.invalid wrote:

can I post data with link_to_remote(),

link_to() has special option :post => true and viola

link_to_remote makes a POST request by default. If you want a GET
request, just specify :method => :get.


sam