Click to See Complete Forum and Search --> : Adding values of Dynamically generated rows


sharapov
03-24-2003, 08:30 PM
Hello,

It seems that I hit a brick wall and need your help. I am generating a table from a database and I want to be able to sum one of the columns and display the result once the page loads. Look at the sample table here (http://home.pacbell.net/sharapov/example.htm) Also I want total value to update if user makes change to one or all of the fields in that column. I can't use T1.value + T2.value (for example) because as I said all data is taken from database, and I simply don't know which Item is going to show up. Can anybody help me with this?

Thanks.

Nedals
03-24-2003, 09:12 PM
Are you looking to sum those numbers (in your table) once the form has loaded and, should any number be changed, recompute the sum?

Like....
onload = ".. sum the fields .."; Could be three or more.
onChange = ".. sum the fields .."

I don't understand "I can't use T1.value + T2.value...". How else can you to sum the fields?? :confused:

This is a double post and more likely javascript. Go to http://forums.webdeveloper.com/showthread.php?s=&threadid=6549