The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to calculate with JS?

I'm just starting out in JS and would like to know how to solve this.
I have an HTML form with 3 checkboxes, like a would-be order form. For example, on checkbox 1, the product is a toy car that costs $5.00, second box is a cigar cutter for $50, etc. I to have a button that when clicked, enters the total price (no taxes or subtotals) into a textbox field below in the same page.
Can someone help out with this? Would really appreciate it.
Thanks.
tigrvision

There is a problem with your code. The calcTotal function expects the object FORM as a parameter. You have call to this function from within INPUT element, but you are passing the INPUT object not the FORM object: