title: Chrome window.location
body: <p>I am trying to redirect a page when click on a button. My JavaScript code works fine in Mozilla Firefox but in Chrome. There is a problem. </p>
  
  <p><strong>Code:</strong> </p>
  
  <pre><code>function myFunction() {
      if ($('#email').val() == "user") {
          if ($('#password').val() == "pass") {
              window.location = "http://www.google.com.tr";
          } else {
              alert("Invalid Password");
          }
      } else {
          alert("Invalid UserID");
      }
  }
  </code></pre>