Using Ajax to post and then redirect
I want to use method 'post' on "https://www.example.com", and then redirect to another page. Like this,
$.ajax({
type: "post",
url: "https://www.example.com",
success: function() { $(location).attr('href','page2.html'); }
});
It seems like the post process works fine.
However, the redirect process ( in success section ) does not work.
Where do I miss about this?
Thank you