title: Passing html values into javascript functions
body: <p>I was making a javascript function in which I need to confirm the input. I wrote the following code but its giving negative value i.e. "else" part even if i enter a valid value. Can some one please suggest a solution?</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;Javascript App&lt;/title&gt;
  &lt;script type="text/javascript" src="app1.js"&gt;
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;&lt;h1 id="heading1" style="text-align:center; height:auto; width:auto; font-family:'Arial Black', Gadget, sans-serif"&gt;Determinant of a nxn matrix&lt;/h1&gt; 
  &lt;p id="paragraph1" style="font-family:'Arial Black', Gadget, sans-serif"&gt; This program allows you to compute the determinant of a nxn matrix&lt;/p&gt;
  
  &lt;p&gt;
  Input the order of the matrix
  &lt;br /&gt;
  
  &lt;input type="text" maxlength="3" name="value" /&gt;
  &lt;input type="button" value="submit" onclick="verifyorder(value)" /&gt;
  &lt;/p&gt;
  &lt;p id="error"&gt;&lt;/p&gt;
  &lt;p id="detspace"&gt;&lt;/p&gt;
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Javascript File:</p>
  
  <pre><code>function verifyorder(order){
  ;
      if(order&gt;0){
          return true;
      }
      else{
          alert("Sorry, you need to enter a positive integer value, try again");
          document.getElementById('error').innerHTML="Sorry, you need to enter a positive integer value, try again"; 
  
      }
  }
  </code></pre>