title: Taking Values from HTML and returning another
body: <p>I'm not sure how to take 2 inputs and return another value. Also is there any way for me to be able to tell where my code is going wrong? I'm still trying to understand all the nuances of how HTML and Javascript work together. I'm currently reading through Eloquent javascript but i'm always looking for suggested resources.  </p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;Wilks&lt;/title&gt;
          &lt;script type="text/javascript" src="wilks.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;p&gt;
              &lt;label for="bodyWeight"&gt;Weight:&lt;/label&gt; 
              &lt;input id="bodyWeight" type="number" placeholder="Pounds"&gt;
              &lt;label for="Big 3 Total"&gt;Big 3 Total:&lt;/label&gt;
              &lt;input id="liftTotal" type="number" placeholder="800" &gt;
              &lt;button onclick="wilksCalculator(bodyWeight, liftTotal)"&gt;Analyze&lt;/button&gt;
          &lt;/p&gt;
          &lt;p&gt;Wilks Coefficient: &lt;span id="outputWilks"&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>// wilks.js</p>
  
  <pre><code>var a =-216.0475144;
  var b =16.2606339;
  var c =-0.002388645;
  var d =-0.00113732;
  var e =7.01863E-06;
  var f =-1.291E-08;
  var x = document.getElementById("bodyWeight").value;
  var inputTotal = document.getElementById("liftTotal").vaule;
  //var outputWilks;
  
  function wilksCalculator(bodyWeight, liftTotal) {
      bodyWeight = x;
      return (liftTotal * (500/((a+b*x)+(c(Math.pow(x,2)))+(d+(Math.pow(x,3)))+(e+(Math.pow(x,4)))+(f(Math.pow(x,5))))));
  
  }
  
  var wilks = document.getElementById("outputWilks").innerHTML;
  if (wilks) {
      wilks.onsubmit = function () {
          this.wilks.value = wilksCalculator(this.bodyWeight.value, 
          this.liftTotal.value);
          return false;
      };
  }
  
  wilksCalculator();
  </code></pre>