title: Multiple if statements and then else Javascript
body: <p>I'm trying to create a calculator in javascript for inverse trigonometry functions (arcsine, arccosine, arctangent) and I have it so there are checkboxes for each input so window.alert doesn't return NULL (user-friendly).
  The Form:</p>
  
  <pre><code>&lt;form name="inverse"&gt;
          &lt;legend&gt;Legend is here.&lt;/legend&gt;
          &lt;input type="checkbox" name="inverse-cb1" value="sine"&gt;&lt;/input&gt;&lt;label&gt; sin&lt;sup&gt;-1&lt;/sup&gt; ( &lt;/label&gt;&lt;input type="text" size=5 name="sin"&gt;&lt;label&gt; )&lt;/label&gt;&lt;br&gt;
          &lt;input type="checkbox" name="inverse-cb2" value="cosine"&gt;&lt;/input&gt;&lt;label&gt; cos&lt;sup&gt;-1&lt;/sup&gt; ( &lt;/label&gt;&lt;input type="text" size=5 name="cos"&gt;&lt;label&gt; )&lt;/label&gt;&lt;br&gt;
          &lt;input type="checkbox" name="inverse-cb3" value="tangent"&gt;&lt;/input&gt;&lt;label&gt; tan&lt;sup&gt;-1&lt;/sup&gt; ( &lt;/label&gt;&lt;input type="text" size=5 name="tan"&gt;&lt;label&gt; )&lt;/label&gt;&lt;br&gt;
          &lt;br&gt;&lt;input type="button" onclick="trigI()" value="Calculate"&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>The script:</p>
  
  <pre><code>function trigI(){
  var sin = document.inverse.sin.value;      //sine
  var cos = document.inverse.cos.value;      //cosine
  var tan = document.inverse.tan.value;      //tangent
  
  var sin1 = Math.asin(sin);      //arcsine
  var cos1 = Math.acos(cos);      //arccosine
  var tan1 = Math.atan(tan);      //arctangent
  
  var sin1d = sin1 * (180/Math.PI);    //convert radians to degrees (sine)
  var cos1d = cos1 * (180/Math.PI);    //convert radians to degrees (cosine)
  var tan1d = tan1 * (180/Math.PI);    //convert radians to degrees (tangent)
  
  if (isNaN(sin) || isNaN(cos) || isNaN(tan) ){
      window.alert("Please input a number.");
  
      return;
  }
  
  if (!document.inverse.inverse-cb1.checked){    //no sine input
      window.alert("When cos(\u2220) = " + cos + " and tan(\u2220) = " + tan + " :" + "\n\n" + "cos\u2212\u00B2(A) = " + cos1d + "\n" + "tan\u2212\u00B2(A) = " + tan1d + "\u00B0");
  
      return;
  }
  
  if (!document.inverse.inverse-cb2.checked){    //no cosine input
      window.alert("When sin(\u2220) = " + sin + " and tan(\u2220) = " + tan + " :" + "\n\n" + "sin\u2212\u00B2(A) = " + sin1d + "\u00B0" + "\n" + "tan\u2212\u00B2(A) = " + tan1d + "\u00B0");
  
      return;
  }
  
  if (!document.inverse.inverse-cb3.checked){    //no tangent input
      window.alert("When sin(\u2220) = " + sin + " and cos(\u2220) = " + cos + " :" + "\n\n" + "sin\u2212\u00B2(A) = " + sin1d + "\u00B0" + "\n" + "cos\u2212\u00B2(A) = " + cos1d + "\u00B0");
  
      return;
  }
  
  if (!document.inverse.inverse-cb1.checked &amp;&amp; !document.inverse.inverse-cb2.checked){       //no sine and cosine input
      window.alert("When tan(\u2220) = " + tan + " :" + "\n\n" + "tan\u2212\u00B2(A) = " + tan1d + "\u00B0");
  
      return;
  }
  
  if (!document.inverse.inverse-cb2.checked &amp;&amp; !document.inverse.inverse-cb3.checked){       //no cosine and tangent input
      window.alert("When sin(\u2220) = " + sin + " :" + "\n\n" + "sin\u2212\u00B2(A) = " + sin1d + "\u00B0");
  
      return;
  }
  
  if (!document.inverse.inverse-cb1.checked &amp;&amp; !document.inverse.inverse-cb3.checked){       //no sine and tangent input
      window.alert("When cos(\u2220) = " + cos + " :" + "\n\n" + "cos\u2212\u00B2(A) = " + cos1d + "\u00B0");
  
      return;
  }
  
  if (!document.inverse.inverse-cb1.checked &amp;&amp; !document.inverse.inverse-cb2.checked &amp;&amp; !document.inverse.inverse-cb3.checked){     //no input or checked boxes
      window.alert("Please input a number or check the correct boxes.");
  
      return;
  }
  
  else {
      window.alert("When sin(\u2220) = " + sin + ", cos(\u2220) = " + cos + ", and tan(\u2220) = " + tan + " :" + "\n\n" + "sin\u2212\u00B2(A) = " + sin1d + "\u00B0" + "\n" + "cos\u2212\u00B2(A) = " + cos1d + "\u00B0" + "\n" + "tan\u2212\u00B2(A) = " + tan1d + "\u00B0");
      return;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The Question: The multiple if statements are not working so the function never returns. How can it be made to check to conditions of the input and respond in the proper way?</p>