title: Output form results on same page
body: <p>I'm trying to display form results on the same page as the form but when I click my "Get Total" button I see the result appear briefly then disappear. My result is off too, I'm trying to add my variables together but I'm getting a join instead. </p>
  
  <pre><code>&lt;form id="percentageBiz" method="post"&gt;
  &lt;input type="text" id="sum1"&gt;
  &lt;input type="text" id="sum2"&gt;
  &lt;input type="submit" onclick="total()" value="Get Total"&gt;
  
  &lt;div id="display" style="height: 50px; width: 100%;"&gt;&lt;/div&gt;
  
  &lt;script&gt;
  function total(){
      var a = document.forms["percentageBiz"]["sum1"].value;
      var b = document.forms["percentageBiz"]["sum2"].value;
      //alert(a+b)
      var display=document.getElementById("display")
      display.innerHTML=a+b;
  }
  &lt;/script&gt;
  </code></pre>