We are trying to use multiple submit buttons in the same form to tie to
different actions on the server side.
This works with non-AJAX type requests. However, now that we are trying
do the same with AJAX, it is not working. Whichever button we press, we
the value of the first button on the form being passed as a parameter to
server. It looks like to me the problem might be related to how Rails
generates its buttons with the same name (commit) but different values.
this legal in AJAX? Does AJAX use DOM? Is there a work-around for this?
The parameters hash looks like…
“commit” => “edit”
even if we press the “cancel” or “test configuration” buttons.
I have Googled about but haven’t found any answers. Can anyone point me
the right direction or recommend a good book on AJAX?
Any help would be appreciated. Thanks,