title: JavaScript validating input only contains integers on submit
body: <p>I've been trying for a bit to find a good way to go about this. Here's the trick this is being developed for IE6, so HTML5 is not supported (which is what is making this a pain, and why the button is actually a span). I need to allow all input into the input element but on submit i need to verify that the input is an integer and if it contains alpha characters or decimals throw an error.</p>
  
  <pre><code> &lt;table id="studentIdInputTable"&gt;
          &lt;tr&gt;&lt;td colspan="3"&gt;&lt;hr class="style-hr" /&gt;&lt;/td&gt;&lt;/tr&gt;
  
          &lt;tr&gt;&lt;td&gt;&lt;span class="underline bold"&gt;Selection 1&lt;/span&gt;&lt;/td&gt;
          &lt;td class="center"&gt;&lt;span class="small-text"&gt;Employee ID&lt;/span&gt;&lt;/td&gt;
           &lt;/tr&gt;
          &lt;tr&gt;&lt;td&gt;Please enter your Student ID to &lt;span class="bold italic"&gt;start your registration process&lt;/span&gt;&lt;/td&gt;
          &lt;td class="center"&gt;&lt;input type="text" maxlength="11" id="tbNewStudentId" /&gt;&lt;/td&gt;
          &lt;td&gt; &lt;span id="btnNewStudent" class="validation-button"&gt;Start&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
     &lt;/table&gt;
  </code></pre>
  
  <p>I have javascript native to the HTML page as below</p>
  
  <pre><code>function CheckNewStudentId(){
  var newStudentID = $("tbNewStudentId").val();
  newEmployeeID = parseInt(newEmployeeID, 10);
          var isNum = /^\d+$/.test(IDnumber);
          if (isNum == false) {
              alert(IDnumber + " is not a valid student number. Please enter only numbers 0-9, containing no alphabetical characters.");
          }
  }
  </code></pre>
  
  <p>It would be easier if this was for a more updated browser platform. Any ideas how I can go about this?</p>
  
  <p>Edit***
  For reference to other users this was solved using this function</p>
  
  <pre><code> function validIdCheck(Input){
   if(Number.isInteger(Input)==false){
  alert("This is not a valid ID");
  }
  }
  </code></pre>
  
  <p>connected to this jQuery click function</p>
  
  <pre><code> $("#btnNewStudent").click(function(){
     var newStuId = $("#tbNewStudentId").val();
     newStuId=parseInt(newStuId);
     validIdCheck(newStuId);
   });
  </code></pre>