Addition operation issues?
<p>Hi i'm trying to do simple addition of two numbers in javascript. When i'm trying to get the two input element values, the result is coming in a concatenation of two numbers </p>

<p>Here is the code:</p>

<pre><code>&lt;html&gt;
&lt;title&gt;
&lt;/title&gt;
&lt;head&gt;
&lt;script type="text/javascript"&gt;
function loggedUser() {
    //Get GUID of logged user
   //alert('success');
   var x, y , result;
   x = document.getElementById('value1').value;
   y = document.getElementById('value2').value;
   result=x+y;
   alert(result);
   document.getElementById('res').value = result;
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;input type="text" id="value1"&gt;&lt;br&gt;
&lt;input type="text" id="value2"&gt;&lt;br&gt;
&lt;input type="text" id="res"&gt;
&lt;input type="submit" value ="submit" onclick=loggedUser();&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
