title: Multiplying two inputs with JavaScript & displaying in text box
body: <p>I am new to JavaScript &amp; am looking for some help doing simple multiplication of two numbers &amp; displaying the result in another text box. I have been trying to get this working for days to no avail :(</p>
  
  <p>Here is the basic HTML along with the JavaScript &amp; a link to a fiddle here <a href="http://jsbin.com/egeKAXif/1/edit" rel="noreferrer">http://jsbin.com/egeKAXif/1/edit</a></p>
  
  <p>What am I doing wrong?</p>
  
  <p>The application I want to write will have at least 12 rows, how would I extend the JavaScript / HTML to accommodate this? Would each input identifier need to be unique?</p>
  
  <p>Any help appreciated :)</p>
  
  <pre><code>    &lt;table width="80%" border="0"&gt;
      &lt;tr&gt;
          &lt;th&gt;Box 1&lt;/th&gt;
          &lt;th&gt;Box 2&lt;/th&gt;
          &lt;th&gt;Result&lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;input id="box1" type="text" /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input id="box2" type="text" onchange="calculate()" /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input id="result" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;/table&gt;
  
  &lt;script&gt;
  
      function calculate() {
      var myBox1 = document.getElementById('box1').value; 
      var myBox2 = document.getElementById('box2').value;
      var result = document.getElementById('result'); 
      var myResult = box1 * box2;
      result.innerHTML = myResult;
  
  }
  &lt;/script&gt;
  </code></pre>