Link_to_remote, doesn't receives params?


#1

Hi,

I’m using link_to_remote to trigger an ajax zone, but
depends on a varaible, the new zone has different
features. before I has a button inside a form. so when
I click on the button, I get the value of the variable
inside “params”. but since I use link_to_remote now, I
don’t get any value from params anymore… Is there
some way I can get the data inside a form with
link_to_remote function???

Thanks you very much

Saiho


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


#2

See parameter :with of link_to_param function. You could pass any valid
Javascript function
i.e. :with=>"‘value’+$F(‘whatever’)"


#3

Hi, thanks you very much for thew information, but I
don’t really understand where I should start, I looked
for a function “link_to_param” in rails api, but I
didn’t find it… can you tell me where I should
go???

Thanks you very much!!!

— Anatol P. removed_email_address@domain.invalid wrote:

but

link_to_remote function???



Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


#4

Hi, Saiho.

Sorry, I made a typo. Of course link_to_remote
And :with param you pass any additional parameter that you want to send
to
server. So if you have some element (for example button) and you would
like
to pass value of this element then you could do it with following
snippet

link_to_remote(… :with=>"‘some_param_name’ + $F(‘some_element_id’)")

I hope that it is exactly you’ve asked.


#5

Anatol P. wrote:

Hi, Saiho.

Sorry, I made a typo. Of course link_to_remote
And :with param you pass any additional parameter that you want to send
to
server. So if you have some element (for example button) and you would
like
to pass value of this element then you could do it with following
snippet

link_to_remote(… :with=>"‘some_param_name’ + $F(‘some_element_id’)")

I hope that it is exactly you’ve asked.

How do i pass another value into the :with, im trying to do a date from
and date to search? now i can only pass one value.