How to submit and validate a form via ajax
问题 Please I am trying to simultaneously submit and validate my form to my database through the use of Ajax, but it is not working for me. Here is my jquery $(document).ready(function(){ $(".button").click(function(){ $("#myform").validate(); //Ajax to process the form $.ajax({ type: "POST", url: "process.php", data: { firstname: $("#firstname").val()}, success: function(){ $('#message').html(data); } }); return false; }); }); The problem is when I submit the form,the Ajax form submit to itself.