I have a form that contains two input fields used for a calculation.
When either one of these fields changes values, a
the sum of these two fields. Right now, I am using observe_form to call
an action in my controller that performs the calculation. An RJS
template takes care of replacing my
However, I want to change this approach so I am not making an AJAX
request to the server whenever the form is updated. I’d almost rather
have a “Calculate” button that will instantly perfrom the calculation
and update my
form data and parse it? Are there Rails helpers or RJS statements that
will do this?
Thanks in advance for any help.