title: javascript input validation
body: <p>i am using javascript validation for my input box from <a href="http://www.javascript-coder.com/html-form/javascript-form-validation.phtml/comment-page-2#comments" rel="nofollow noreferrer">javascript-coder</a> but i have 2 problems here.</p>
  <p>First: The validator in the script uses name to validate the object, is it possible to change to id in the gen_validatorv4.js and how?</p>
  <p>Second: my page reloads itself despite of alert produces by the textbox. it's suppose to stay on the page and allow user to correct error.</p>
  <p>below is my script placement</p>
  <pre><code>    function submitform(){
      var frmvalidator  = new Validator(&quot;myform&quot;);
      frmvalidator.addValidation(&quot;amountperIteration&quot;,&quot;numeric&quot;,&quot;Name a price greater than $25&quot;);
      frmvalidator.addValidation(&quot;amountperIteration&quot;,&quot;gt=25&quot;,&quot;Name a price greater than $25&quot;);
      
      document.forms[0].submit();
  }
  </code></pre>
  <p>my html code is simplify to something like that: (my back end is using python)</p>
  <pre><code> &lt;form action=&quot;{{ request.path }}&quot; name=&quot;myform&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot; onsubmit=&quot;return false&quot;&gt;
   &lt;input type=&quot;text&quot; name=&quot;amountperIteration&quot;&gt;
   &lt;input type=&quot;submit&quot; value=&quot;submit&quot; onclick=&quot;submitform&quot;&gt;
   &lt;/form&gt;
  </code></pre>
  <p>Any advice?</p>