Open source software security

JavaScript Check Box Adding/Subtracting Snipit

This function adds the values of checkboxes, as the boxes are checked thier value is dynamically updated, as the boxes are unchecked the value gets subtracted. Useful for maintaining accurate totals. Although there are many different ways to accomplish this 'running tally' I've provided two simple methods below. The first is more succinct, but the second may meet your needs better depending on requirements.