# Adding values with javaScript problem

**URL:** https://forum.kirupa.com/t/adding-values-with-javascript-problem/255263
**Category:** web dev
**Created:** [March 20, 2008, 3:41pm UTC](https://forum.kirupa.com/t/adding-values-with-javascript-problem/255263 "2008-03-20T15:41:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tanel96](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tanel96](https://forum.kirupa.com/u/tanel96)
#### Post date: [March 20, 2008, 3:41pm UTC](https://forum.kirupa.com/t/adding-values-with-javascript-problem/255263/1 "2008-03-20T15:41:12Z")

</div>

I uploaded two test pages:

[INDENT][http://fritz.planet.ee/test/test1.html](http://fritz.planet.ee/test/test1.html) \<- everything works the way it should[/INDENT][INDENT][http://fritz.planet.ee/test/test2.html](http://fritz.planet.ee/test/test2.html) \<- nothing happens when i select Item1[/INDENT]This is supposed to be a small calculator, that sums up the values of the stuff one has selected, but when there is only one item in the list, then the code doesn’t function.

Any ideas ?
