title: Best way to totalise dynamically created table row and column values using Javascript?
body: <p>I've to create a table with a row of input boxes.
  The values entered in will then be multiplied by script and the answer placed in the last input box, the row total, if you will.</p>
  
  <p>There is a button above the table to add another row.
  Each time a row is added, the same input boxes need to appear, and the same 'row script' to calculate the row total.</p>
  
  <p>Once a particular row has been added/updated, and it's row total calculated, a final number needs to be found, which is essentially the total of the row totals. Let's call it the column total.</p>
  
  <p>My skills aren't super high, am learning as I go, especially from the decent responses this site seems to attract. One hopes this is at least understandable....</p>
  
  <p>I've managed to get row to be added by a button using table.insertrow, and the scripts for doing the math are no problem. I have also managed to use a simple loop to create the dynamic variable names for each input box; named the same and numbered by row.</p>
  
  <p>Where I'm stuck is generating the scripts to totalise a line and then another tot totalise the table, as the script needs to factor in how many rows there are, and I can't see how to write this except using Eval() (so far..).</p>
  
  <p>I've also experimented a little with this and each but just got bogged down and could no longer see the logical flow.</p>
  
  <p>What I've written to date is now just a mess.</p>
  
  <p>Instead of posting code for comment/fix, I seek to better understand which way to address the problem using Javascript if at all possible, hopefully without using Eval().</p>
  
  <p>Any suggestions would be welcomed by this brain-dead, gone bleary, wishing he hadn't started, noob.</p>
  
  <p>UPDATE: Have seen a lot of ways to use JQuery, but it's not for me at the moment.</p>
  
  <p>perhaps phrased differently - how in javascript would you loop through a table column, adding up all of the cell contents (numbers) in that column, please. I can't seem to figure out how to use Each as the variable names are different (numbered) per row.</p>