I have a modal dialog which has a form. When a user clicks the submit button on the dialog, I want the form to be submitted, and it works fine. I am using ajax request, hence using return false; in the submit. Here’s my code:
$("#new_account_class").live("submit", function(){
$.post(this.action, $(this).serialize(), null, "script");
return false;
});
Now, I want the dialog to be closed within the same event. The problem is that, anything I write after return false; is not executed, and I cannot close the dialog before the return false. But there must be a way out, can anyone help, please? Thanks.
1 Answer