title: Window.location doesn't work after ajax request
body: <p>Window.location doesn't work after a success respond when it  call a ajax request, the success function it called.</p>
  
  <p>when i execute on firefox on debugger step by step the window.location  it works . </p>
  
  <pre><code>function login(){
  
  var jason ={"usuario":document.getElementById("inputusuario").value,
          "password": document.getElementById("inputpassword").value
             };
              json =JSON.stringify(jason);
  
            console.log(json);
  
  var onSuccess = function (data) {
      console.log('Success');
      window.location ='salas.html'
  
  };
  var onError = function (jqXHR, textStatus, errorThrown) {
      console.log(jqXHR);
      console.log(textStatus);
      console.log(errorThrown);
      alert("no se conecto");
  
  };
  
  var onBeforeSend = function () {
      console.log("Loading");
  };
  
  var jason ={"usuario":document.getElementById("inputusuario").value,
          "password": document.getElementById("inputpassword").value
             };
  
              json =JSON.stringify(jason);
  $.ajax({
  
      url: "../reservaciones/index.php/login",
      type:"POST",
       data: json,
      cache: false,
      async: false,
      beforeSend: onBeforeSend,
      error: onError,
      success: onSuccess
   });
  };
  </code></pre>