title: JS Function Trouble - Reutning NaN
body: <p>I am trying to make a salary calculator that takes the input of hours, multiplies it by the hourly rate and then gets multiplied by 52 for an annual salary. My issue comes when I try to run my function to get the salary. Whenever I press it, I am met with an NaN. Any help would be greatly appreciated</p>
  
  <pre><code>   &lt;form name="salInput"&gt;
         Hourly Rate &lt;input type ="text" id="HourlyRate" /&gt;&lt;br /&gt;
         Hours per Week &lt;input type ="text" id="HoursPerWeek" /&gt;&lt;br /&gt;    
      &lt;/form&gt;
  
  
      &lt;script&gt;
        var a = parseFloat(salInput.HourlyRate.value);
        var b = parseFloat(salInput.HoursPerWeek.value);
        var c = a*b*52; 
       function salCalc(){ 
  
       document.getElementById("change").innerHTML = c;
  }
       &lt;/script&gt;
  
  
  &lt;button onclick="salCalc()"&gt;Calculate&lt;/button&gt;
  &lt;p id="change"&gt;&lt;/p&gt;
  </code></pre>