link_to

I am trying to use an encrypted request to PayPal using my own submit
button link
I googled a little but, but could not find a clear & neat solution, so
I ended writing this :

== Rails 2.3.8 script code ====
...
    <% form_tag APP_CONFIG[:paypal_url], {:id => 'form_paypal'} do %>
      <%= hidden_field_tag :cmd, "_s-xclick" %>
      <%= hidden_field_tag :encrypted, @cart.paypal_encrypted(root_url,
payment_notifications_url(:secret => APP_CONFIG[:paypal_secret])) %>
      <p><%= link_to_function "OK", "$('form_paypal').submit()" , :class
=> 'buy' %></p>
    <% end %>
...

[SOLVED] I realized that I was using jQuery and not Prototype
anymore ..
so the link_to function was not right and should have been written
with the correct jQuery id # : ('#form_paypal').submit()

<%= link_to_function "OK", "$('#form_paypal').submit()" , :class =>
'buy' %>