I have a similar simple problem and have done my best to create a JQuery based on Eric's original example.  However I can't get it working.  I simply want to subtract an actual amount from a budget amount and display the difference in the next field down.  I'm just not familiar enough with JQuery language.  Could someone help?  Looks like I can't attach the form, so here is my JQuery
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
 <script type="text/javascript">$(document).ready(function(){
$('#number10').keyup(function(){
var valone = $('#number10').val();
var valtwo = $('#number11').val();
var total = (valone - valtwo);
$('#number37').val(total); 
});
$('#number11').keyup(function(){
var valone = $('#number10').val();
var valtwo = $('#number11').val();
var total = (valone - valtwo);
$('#number37').val(total); 
});
});</script>
Thanks to everyone who volunteers here