title: How to redirect using AJAX?
body: <p>I have the following code:</p>
  
  <pre><code>function get_login()
  {
      hideshow('loading2',1);
      error(0);
  
      $.ajax({
          type: "POST",
          url: "The URL",
          data: $('#logins').serialize(),
          dataType: "json",
          success: function(msg){  
  
              if(parseInt(msg.status)==1)
              {
                  succ2(1,msg.txt);                   
                  setTimeout('go_to_you_page()', 1000);
  
              } else if(parseInt(msg.status)==0) {
                  error2(1,msg.txt);
              }
  
              hideshow('loading2',0);
          }
      });
  
      return false;
  }
  
  function go_to_you_page()  
  {  
      window.location = 'myaccount.php';     
  } 
  </code></pre>
  
  <p>If the user is not logged in, it will add <code>index.php?redirect=inbox.php</code> (for example)</p>
  
  <p>How can i redirect the user after logging in to the <code>/inbox.php</code> ?</p>
  
  <p>Thank you in advance!</p>