Handle submit event with jquery -
i'm trying handle forms submit event jquery, following never triggers:
$.validator.setdefaults({ submithandler: function() { alert("hello"); var p = document.createelement("input"); // add new element our form. form.appendchild(p); p.name = "p"; p.type = "hidden"; p.value = hex_sha512(password.value); // make sure plaintext password doesn't sent. password.value = ""; // submit form. $("#registerform").submit(); } });
any ideas why?
Comments
Post a Comment