I've got a normal link:
<a href=http://www.google.com class=continue>Continue</a>
I've bound the click to an event to post an ajax request like this:
$('.continue').click(function () {
$.ajax({
type: 'POST',
url: '/url-to-post-to',
data: mydata,
contentType: 'application/json',
error: function (err) {
alert(error - + err);
},
success: function () {
return true;
}
});
});
What I'm trying to get to happen is the link to be followed on success....
ie, if there is no error, user should be redirected to google.
I know I can put window.location.href
in the success handler, but I was trying to avoid this if possible