I'm using the jquery.validationEngine and have it working on both my registration and login forms. I'm able to use javascript sourced from the comments here to hash the password field before it is sent to the server for additional hashing and saving to the database. However, I'm unable to call the hashing script and then get the form to continue submitting. Can anyone point me in the right direction?
Hashing Script:
function formhash(form, password, p) {
p.value = hex_sha512(password.value);
password.value = "";
Relevant Head for Validator: I just can't figure out what goes in place of the string of question marks. I've tried a number of different combinations and just can't seem to get it. The validation works, but the form submits without running my formhash script if validation passes.
<script>
jQuery(document).ready( function() {
jQuery("#login").validationEngine('attach',
{onValidationComplete: function(form, status){
if (status == true) {
$("form#login").bind('submit', function(e) {
e.preventDefault();
});
// your function or your action
???????????????????
}
}
});
</script>