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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -