I've following code
submitHandler: function(form) {
$.ajax({
url: GLOBAL_URL + '/searching',
data: $(form).serialize(),
type: 'POST'
});
window.location.href = GLOBAL_URL + '/complete';
}
What I'm trying to do is when the form gets submitted after validation, I want the user to be redirected to other page while it's searching in the background.
But it doesn't. It waits for the ajax to complete the request and then it redirects.
This ajax works fine out of the jquery validation plugin but now inside. I also tried to set async: true. But no help.
I don't want the user to wait while it's searching. I just want to redirect the user as soon as user submits the form and ajax is fired successfully.
Help me with this. Thanks
ajaxComplete()ajax()if you still want the page to redirect? Just use a standard form submit.