Auto Sum Checkboxes | JavaScriptSource

Auto Sum Checkboxes

Jay Rumsey Apr 4, 2008


As the user selects items in the form, this script will display a running total automatically. No need to keep reloading the page, and no surprises for your user at the check-out point. Easy to implement into your existing forms.

Game Order Form

Game 1 (  9.99)
Game 2 (19.99)
Game 3 (27.50)
Game 4 (45.65)
Game 5 (87.20)
Total cost: $


Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: autoSumCheckboxes.js


Paste this code into the HEAD section of your HTML document.


Paste this code into the BODY section of your HTML document

Leave a Response



mani Sep 5, 2012

I have 58 checkboxes in different tables but in same form. Now how can I do the same thing your program is doing when clicking each checkbox and summing up its value?

Amras Apr 3, 2012

Thanks I was trying to get this accomplished but had several failed attempts with many fields.

Sandy Dec 11, 2008

Awesome script and thanks for the personal help with my issues. Does what I need it to do.

Steve DeQuaker Nov 5, 2008

Your question is beyond the scope of these comments. You will need to post it over on [a href=""]the JavaScript forum[/a]. Thanks!

Lee Oct 31, 2008