javascript and html logic statements
<p>So for a project I was assigned to make a simple html page that links to a javascript file. On this page there are 3 integer inputs and 2 buttons. The buttons test whether the integers will make a triangle or not, and the second button will test whether the integers make a right triangle.</p>

<p>Right now I am still having trouble with the first button.
I am using the algorithm:<br>
    a+b>c<br>
    a+c>b<br>
    b+c>a</p>

<p>if all of these are true then the statement should return as "It forms a triangle" and the else should state that it would not return a triangle.</p>

<p>I think I have the logic and the set-up right but when I go to test all conditions will return true.<br>
Any help would be much appreciated. Sorry if my code is kind of sloppy or doesn't make sense I'm still learning.</p>

<p>Thanks again.</p>

<p>HTML File:</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Triangle Tester&lt;/title&gt;
&lt;script src="project3.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div&gt;
&lt;h1&gt;Triangle Tester&lt;/h1&gt;
&lt;p&gt;Please input the length (integer) of the first side of the triangle: &lt;/p&gt;
    &lt;input id="t1" type="text" size="3" /&gt;

&lt;p&gt;Please input the length (integer) of the second side of the triangle: &lt;/p&gt;
    &lt;input id="t2" type="text" size="3" /&gt;

&lt;p&gt;Please input the length (integer) of the third side of the triangle: &lt;/p&gt;
    &lt;input id="t3" type="text" size="3" /&gt;

&lt;br/&gt;
&lt;span id="answer"&gt;&lt;/span&gt;
&lt;br/&gt;

&lt;button onclick="compute1();"&gt;Can these three sizes form a triangle?&lt;/button&gt;
&lt;button onclick="compute2();"&gt;Can these three sizes form a right triangle?&lt;/button&gt;    
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>JavaScript File:</p>

<pre><code>// JavaScript Document
function compute1()
{
    var in1 = document.getElementById("t1"); //A
    var in2 = document.getElementById("t2"); //B
    var in3 = document.getElementById("t3"); //C
    var ans = document.getElementById("answer");

    if( (in1.value+in2.value&gt;in3.value)&amp;&amp;
        (in1.value+in3.value&gt;in2.value)&amp;&amp;
        (in2.value+in3.value&gt;in1.value) )
    {
        var result = "These three sides can form a triangle!";
        ans.innerHTML = result;
    }

    else
    {
        var result2 = "These three sides cannot form a triangle!";
        ans.innerHTML = result2;    
    }
}

function compute2()
{
    return 0;   
}
</code></pre>

<p>So any help would really be appreciated.</p>