Displaying 1 result from an estimated 1 matches for "update_totals".
2006 Nov 04
0
RJS not setting form input value correctly
...t;width: 50%"/>
The RJS template code is as follows:
page << "(''total_commission_#{@product_id}'').value=''" +
number_to_currency(@new_total_commission, { :precision => 4 }).to_s + "'';"
The controller code is as follows in the update_totals method which is
called via the observe_field :
if @comm_type == "L"
@new_total_commission = @new_total_sell.to_f * @converted_rate.to_f
else
@new_total_commission = @new_total_weight.to_f * @converted_rate.to_f
end
Outputting debug to the log file shows that the @new_total_commis...