I got it. I was having problems passing the field id's as
variables, but I FINALLY got it to work. The function is like this:
<script type="text/javascript">
function doAdd(a,b,c,d,e,X)
{
var numVal1=parseInt(document.getElementById(a).value);
var numVal2=parseInt(document.getElementById(b).value);
var numVal3=parseInt(document.getElementById(c).value);
var numVal4=parseInt(document.getElementById(d).value);
var numVal5=parseInt(document.getElementById(e).value);
var totalValue = numVal1+numVal2+numVal3+numVal4+numVal5;
document.getElementById(X).value=totalValue;
}
</script>
And in each text box (except the subtotal box) I have to code
this:
onchange="doAdd('Fund1_1','Fund1_2','Fund1_3','Fund1_4','Fund1_5','SubTotal_1b')"
But this works great, now I can use the same function for all
of the subtotals on my form. Whoopee!