I have a form like this
You can handle this in your action, you calling onSubmit()
from server code redirect it to the page you want.
Or you need to use ajax post() calls which give you onSuccess and onFailure events on call complete. Something like this:
$('#add-to-cart').submit(function() {
$.ajax({
type: 'POST',
url: $(this).attr('action'),
dataType: 'json',
success: function(json) {
window.location.href = "http://www.page-2.com";
}
})
return false;
});