Auto-Sum Form Boxes | JavaScriptSource

Auto-Sum Form Boxes

Jim Stiles May 13, 2005


This script will automatically total boxes in a form. Use it to keep a running total of quantites or prices in an order form.



Source Code

Paste this source code into the designated areas.

External file

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


Paste this code into your external CSS file or in the <style> section within the HEAD section of your HTML document.


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


I think this script is broken; i tried it in Chrome and it doesn't work. (Maybe in the past?)

Tim Jul 27, 2013

Magic! Just Magic! Love you Guys! I really, really needed this. Spent days trying to figure it out.

Morgan Nov 30, 2012

thanks alot[br /]i was in need indeed for that scribt

moustafa Nov 13, 2008

Mark,[br /][br /]You would just need to add another variable to the calc() function (with a different name), and add it to the autoSumForm line. Then add another box in the form, using the same name you used in the calc() function.

Lee Nov 6, 2008

You can find a script for that [a href=""]here[/a]

Lee Nov 6, 2008