title: JavaScript - validate numeric only and within range
body: <p>I have an asp form which has a number of fields.  On submit I want to check, using javascript that a tickbox has been selected and that an 'amount' field in within a given range AND has numbers only.  I'm struggling to get it to check all three in one go - at the mometn i have the following:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function validateForm()
  {
  var x=document.forms["myForm"]["Amount"].value;
  if (x&lt;5 || x &gt;250)
    {
    alert("Please complete all required fields - Amount you wish to save");
    return false;
    }
  
  else if ( myForm.agreesubmit.checked == false )
    {
    alert ( "You Must Agree To The Terms and Conditions" );
    return false;
    } 
  
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>At the moment this is two seperate checks for tick box select and range.</p>
  
  <p>Any ideas appreciated.</p>