title: ajax redirect does not work
body: <p>I have a Login form where there are two fields - <code>username</code> and <code>password</code>.
  I am using ajax to send this variables to <code>login.php</code> which works.
  Now I need to get the <code>data</code> back from <code>login.php</code> so I do this:</p>
  
  <pre><code>$.post('login.php',{username:username,password:password},
   function(data)
   {
      $('#data').html(data);
      if (data=='login'){
          window.location="http://www.google.co.uk";
  
      }
  
   });
  </code></pre>
  
  <p>The problem is the code should redirect to <code>http://www.google.co.uk</code> 
  if only the data is <code>== login</code>But it doesnt. please help thanks!    </p>