I have an HTML form that submits an email with PHP, and when it submits, it redirects to that PHP page. Is there a way to prevent this redirect from happening? I built an animation with jQuery that I want to occur instead of redirecting. I tried return false;, but it wouldn't work. Here's my function:
$(function() {
$('.submit').click(function() {
$('#registerform').submit();
return false;
});
});
Here's the opening form tag:
<form id="registerform" action="submit.php" method="post">
And the submit button:
<input type="submit" value="SUBMIT" class="submit" />
Somebody's GOT to know how to do this. Thanks!