title: How to get a number value from an input field?
body: <p>I have some issues with calculating some stuff with JS and getting the right values out of the input fields (number). When I use this code it doesn't show anything. So what is wrong with my JS? Do I need to include a jQuery file?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
          &lt;form  id="frm1" action="Calculate.html"&gt;
              &lt;table width="350px" border="1px"&gt;
                  &lt;tr&gt;
                      &lt;th colspan="2"&gt;Availability&lt;/th&gt;
                  &lt;/tr&gt;       
                  &lt;tr&gt;
                      &lt;td&gt;Total Production Time&lt;/td&gt;
                      &lt;td&gt;&lt;input type="number" name="TotalProductionTime" placeholder=""&gt; hours&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;Breaks&lt;/td&gt;
                      &lt;td&gt;&lt;input type="number" name="Breaks" placeholder=""&gt; minutes&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;Malfunctions&lt;/td&gt;
                      &lt;td&gt;&lt;input type="number" name="Malfunctions" placeholder=""&gt; minutes&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;Theoretical production time:&lt;/td&gt;
                      &lt;td&gt;&lt;p id="test"&gt;&lt;/p&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
  
  &lt;input type="button" onclick="Calculate()" name="Calculate" value="calculate"&gt;
  &lt;script&gt;
      function Calculate()
      {
          var TotalProductionTime = document.getElementById("TotalProductionTime").value;
          var TotalProductionTimeInMinutes = TotalProductionTime * 60;
          var Breaks = document.getElementById("Breaks").value;
          var Malfunctions = document.getElementById("Malfunctions").value;
          var TheoreticalProductionTime = TotalProductionTimeInMinutes - Breaks - Malfunctions;       
  
          document.getElementById("test").innerHTML = TheoreticalProductionTime;
      }
  &lt;/script&gt;   
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>