# Calculate Form Field Values with Ajax

**URL:** <https://www.ruby-forum.com/t/calculate-form-field-values-with-ajax/143273>\
**Category:** Rails\
**Created:** [July 16, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/calculate-form-field-values-with-ajax/143273 "2008-07-16T22:01:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@adrian](https://www.ruby-forum.com/u/adrian)\
**Post date:** [July 16, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/calculate-form-field-values-with-ajax/143273/1 "2008-07-16T22:01:06Z")

</div>

Hello everybody, I need some help hope can find it here.  
I have 3 text boxes:

1. value
2. exchange\_range
3. value/exchange\_rate

Well I want the 3rd text box to be calculated based on the first 2,  
with AJAX or maybe Javascript??? Also should be on change not with a  
submit button.  
Any help will be greatly appreciated.  
Thanks.
