title: javascript running total adding incorrectly
body: <p>Hey everyone I'm trying to do a very simple calculation using javascript to find a running total.  I seem to be missing something.  I did look through SO and found some very similar scenarios but, I can't seem to relate to my own code.  </p>
  
  <p>Here is the script I am using to calc my running total.  </p>
  
  <pre><code>    var total = 0;
  
      function GetTotal(txtBox) {
          total += parseInt(txtBox.value) || 0;
          $("#chkTotal").html(total);
      }
  </code></pre>
  
  <p>and here is some code from my view:</p>
  
  <pre><code> &lt;div class="editor-field"&gt;
          @Html.TextBox("FirstDemo", String.Empty, new { id = "firstdemo", onchange =     "GetTotal(this)" })
          @Html.ValidationMessageFor(model =&gt; model.FirstDemo)
      &lt;/div&gt;
  
  
  &lt;div&gt;
          &lt;h3&gt;Total Checked&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div id="chkTotal"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>The total calculates perfectly, until a value is changed in a text box, in which case whatever has been entered in the textbox is added again to the running total.</p>
  
  <p>Can anyone help me?</p>