0

I have a javascript variable, I would to send along with my params when a person clicks a link.

var js_variable = something;
...
<%= link_to_remote "Link Name", {:url => {url_params}, ajax_options}, {html_options} %>

how do I add js_variable to the url_params hash??

Using rails 2.3.8

NullVoxPopuli
  • 61,906
  • 73
  • 206
  • 352

1 Answers1

0

possibly this older question will be useful to you Rails3 - How to send Javascript Variable to a controller's action with the link_to helper?

But it seems to me you should be using link_to_function and change the href at runtime

Community
  • 1
  • 1
riffraff
  • 2,429
  • 1
  • 23
  • 32