ajax response redirect problem
- by zurna
When my member registration form correctly filled in and submitted, server responds with redirect link. But my ajax does not redirect the website. I do not receive any errors, where is my mistake?
<script type="text/javascript">
$(document).ready(function() {
$("[name='submit']").click(function() {
$.ajax({
type: "POST",
data: $(".form-signup").serialize(),
url: "http://www.refinethetaste.com/FLPM/content/myaccount/signup.cs.asp?Process=Add2Member",
success: function(output) {
if (output.Redirect) {
window.location.href = output.Redirect;
}
else {
$('.sysMsg').html(output);
}
},
error: function(output) {
$('.sysMsg').html(output);
}
});
});
});
</script>
asp codes:
If Session("LastVisitedURL") <> "" Then
Response.Redirect Session("LastVisitedURL")
Else
Response.Redirect "?Section=myaccount&SubSection=myaccount"
End If