title: How to dynamically calculate the total of each column in a table on an HTML page?
body: <p>I will basically have a table with days of the week (header row across). <strong>Column 1-Sunday</strong>, <strong>Column 2-Monday</strong>, etc. Each cell will be entered with hours worked, i.e., <code>8</code>.
  The last row I want each cell to dynamically calculate the total of the cells above it in its column, after the data is entered into each cell. Ideally, this should be calculated after moving the cursor to a different cell.</p>
  
  <p>It seems like I should use some JavaScript for this. But I can't write JavaScript from scratch; I can only tweak it to what I need after it's been written.</p>
  
  <p>For our purposes here's a basic table. I'll put examples in <strong>Column 1</strong>. </p>
  
  <pre><code>&lt;table id="workweek" class="wwtable"&gt;
  &lt;tr&gt;&lt;th&gt;sunday&lt;/th&gt;&lt;th&gt;monday&lt;/th&gt;&lt;th&gt;tuesday&lt;/th&gt;&lt;th&gt;wednesday&lt;/th&gt;&lt;th&gt;thursday&lt;/th&gt;&lt;th&gt;friday&lt;/th&gt;&lt;th&gt;saturday&lt;/th&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;8 &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;8 &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;8 &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;8 &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;8 &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;(Calculate 40 here) &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Forgot to mention. Each cell will have the user input the hours for each day, so there will be input fields in each cell.</p>