The easiest way to send a form
Don’t use SUBMIT as the button, use BUTTON
This means any form named #form1 will be posted with whatever is in your form
1 2 3 4 5 6 |
$(".subbut").click(function(){ $(".subbut").attr('value', 'Submitting...'); //change the button name $.post("http://mywebsite/post.php", $("#form1").serialize()); window.location="http://www.google.com"; //after submitting go here |