Forum: Ruby on Rails submitting a form- variations..

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.
873a9db33e289b558e89c039629562f5?d=identicon&s=25 James Smith (jmdjmsmith)
on 2007-02-02 20:00

I have a remote form which i submit using 'onsubmit()' from two
different links in my view. I understand that html limits us to only
executing a single action when a form is submitted - however i would
like to distinguish between which of the links the form has been
submitted from..

This is an example of one of the two links that submit my form:

<= link_to_remote 'link', :before => "javascript:myform.onsubmit()" %>

Is there a way to pass the form a parameter using this javascript call
to submit the form?

The only way i can think of is to update a value in the database in the
link_to and then check for this value (boolean) - in the controller
method that is called when the form is submitted.. seems very messy..

any ideas??

20139de0a00fc8675e86d52f12f988ad?d=identicon&s=25 Jamez (Guest)
on 2007-02-06 11:32
(Received via mailing list)
Try posting your question on You might get your answer

On Feb 2, 8:00 pm, James Smith <>
This topic is locked and can not be replied to.