title: Javascript triangle determine
body: <p>I'm writing a basic programme in javascript which determines what kind of Triangle is being made if someone inputs a certain variable into either 3 inputs.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;link href="stylesheet/stylesheet.css" rel="stylesheet" type="text/css"&gt;
  
  &lt;script language="Javascript" type="text/javascript"&gt;
  
  /*  Key/Legend
  Var
      inp1 = input1
      inp2 = input2
      inp3 = input3
      Triangle_Inputs = Form Name
  
      */
  
  /* Notes
  
      In computing, a parser is one of the components in an interpreter or 
      compiler that checks for correct syntax and builds a data structure 
      (often some kind of parse tree, abstract syntax tree or other hierarchical structure) 
      implicit in the input tokens.
  
  
      Technique
      if (side1 is equal to side2 AND side 2 is equal to side3) {equalitateral}
  
      if (side1 is equal to side2 AND side 2 doesn't equal to side3) {isosceles}
  
      if (side1 doesn't equal to side2 AND side2 doesn't equal to side 3 AND side 3 doesn't equal side 1) {scalene}
  
      http://www.w3schools.com/js/js_comparisons.asp
  
      */
  
  
  function checkinputs()
  {
  /* Var = parseInt(document.Name_Of_Element_Form.Field_Name(Input).value); */
  /* Input Fields */
  inp1 = parseInt(document.Triangle_Inputs.input1.value);
  inp2 = parseInt(document.Triangle_Inputs.input2.value);
  inp3 = parseInt(document.Triangle_Inputs.input3.value);
  /* Side options */
  sideA = (inp1 + inp2);
  sideB = (inp1 + inp3);
  sideC = (inp2 + inp3);
      if (sideA == sideB &amp;&amp; sideB == sideC) {
      alert("Equalateral");
      }
      if (sideA == sideB &amp;&amp; != sideC) {
      alert("Isosceles");
      }
      if (sideA != sideB == sideC) {
      alert("Isosceles");
      }
      if (sideA != sideB != sideC != sideA) {
      alert("Scalene!");
      }
  }
  &lt;/script&gt;
  
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="Container"&gt;
  
  &lt;div id="Header"&gt;&lt;h1&gt;&lt;/h1&gt;&lt;/div&gt;
  
          &lt;div id="Content_1"&gt;
                  &lt;div id="Explanation"&gt;
                  This calculator will determine what
                  triangle you have made depending on
                  the integer values in the input fields.
  
                  &lt;/div&gt;
                  &lt;div id="Form"&gt;
                      &lt;FORM NAME="Triangle_Inputs" METHOD="GET"&gt;
                      Enter the triangle values below: &lt;br&gt;
                      &lt;p&gt;
                      &lt;h4&gt;Side 1: &lt;/h4&gt;&lt;BR&gt;
                      &lt;INPUT TYPE="Integer" NAME="input1" VALUE=""&gt;&lt;P&gt;
                      &lt;h4&gt;Side 2: &lt;/h4&gt;&lt;BR&gt;
                      &lt;INPUT TYPE="Integer" NAME="input2" VALUE=""&gt;&lt;P&gt;
                      &lt;h4&gt;Side 3:&lt;/h4&gt; &lt;BR&gt;
                      &lt;INPUT TYPE="Integer" NAME="input3"  VALUE=""&gt;&lt;P&gt;
                      &lt;INPUT TYPE="button" NAME="Submit" Value="Submit" Class="Submit" onClick="checkinputs()"&gt;
                      &lt;/FORM&gt;
                  &lt;/div&gt;
                  &lt;div id="Verbal_Output"&gt;
                      &lt;h2&gt;You made a:&lt;/h2&gt;
                      &lt;p&gt;        
                      &lt;h2&gt;Triangle&lt;/h2&gt;
                  &lt;/div&gt;
  
              &lt;/div&gt;
              &lt;p&gt;
              &lt;p&gt;
          &lt;div id="Content_2"&gt;
  
          &lt;div id="Image_Output"&gt;asdad&lt;/div&gt;
      &lt;/div&gt;      
  &lt;/div&gt;
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>However I think I'm missing something, I can't seem to get the alert to tell the user anything.</p>
  
  <p>Thanks everyone, sorry for posting this question it's just really confusing me</p>