title: Jquery validationEngine onclick
body: <p>I have this jquery plugin Jquery ValidationEngine which is trigger by this:</p>
  
  <pre><code>    &lt;script&gt;
          jQuery(document).ready(function(){
              // binds form submission and fields to the validation engine
              jQuery("#editar").validationEngine('attach');
          });
  &lt;/script&gt;
  </code></pre>
  
  <p>and it works fine, but on the submit button I have this:</p>
  
  <pre><code>&lt;input type="submit" value="SUBMIT" onclick="formhash(this.form, this.form.password);"  id="BotaoEntrar"/&gt;&lt;/td&gt;
  </code></pre>
  
  <p>That onclick sends the password through a javascript file (THIS):</p>
  
  <pre><code>    function formhash(form, password) {
     // Create a new element input, this will be out hashed password field.
     var p = document.getElementById("p");
     // Add the new element to our form.
     form.appendChild(p);
     p.name = "p";
     p.type = "hidden"
     p.value = hex_sha512(password.value);
     // Make sure the plaintext password doesn't get sent.
     password.value = "";
     // Finally submit the form.
     form.submit();
  }
  </code></pre>
  
  <p>So this thing right here "cuts" the validation jquery (if I remove the onclick it works fine, but then the encrypted password doesn't work) but I want the two things working together..</p>
  
  <p>Something like "if validation is correct -> formhash.... else echo"error validation" " but I don't know much about jquery and javascript.. It's possible to have the two things working together? </p>
  
  <p>Here is the API for the jquery validation: <a href="http://posabsolute.github.io/jQuery-Validation-Engine" rel="nofollow">http://posabsolute.github.io/jQuery-Validation-Engine</a></p>