I’m posting a form vi jQuery’s $.post and this is my code:
function onSuccess() {
// Do something onSuccess
alert('yep');
}
$('#createUserForm').submit( function(){
$.post("test.php", $(this).serialize(), onSuccess())
});
How come the browser alerts “yep” and then reloads the page?!
Thanks!
For one thing:
Second, disable the default action: