On Apr 4, 2008, at 3:15 PM, Paul Erskine wrote: A couple of quick things:
1. with the onclick, I think you need a semicolon at the end: "total_Prices();" . I'm not sure if its necessary, but it could be an issue. 2. I think using payment[x] is bad because it has the same format as an array. When you do ...form.payment[0].val... I believe its looking for an array. You might want to change your inputs to payment_0, payment_1, payment_2 - paul
On Fri, Apr 4, 2008 at 1:58 PM, Robert Poland < email@hidden> wrote: HI, I use this to call the following function. I had it working but somehow I broke it. I can't for the life of me see what I'm missing. Any suggestions? <input name="payment[0]" id="payment[0]" type="checkbox" value="15" /> ... <input id="total_amount_due" name="total_amount_due" value="" type="text" maxlength="10" /> <script type="text/_javascript_"> function total_Prices() { var a = Number(document.request_form.payment[0].value); var b = Number(document.request_form.payment[1].value); var c = Number(document.request_form.payment[2].value); var x = a + b + c;
This line needs to be; var x = Number(a+b+c);
Bob Poland - Fort Collins, CO
|