ajax response redirect problem

Posted by zurna on Stack Overflow See other posts from Stack Overflow or by zurna
Published on 2010-03-14T23:36:29Z Indexed on 2010/03/14 23:45 UTC
Read the original article Hit count: 304

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about asp-classic