title: window.location.href not working
body: <p>This is my script:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $("#login").click(function(){
              var user = $('#userID').val(); 
              var pass = $('#password').val();
              if (user === '' || pass === ''){
                  alert("Please Fill Required Fields");
              } 
              else {
                  alert (user+" " +pass);
                  var x="&lt;?php confirm();?&gt;";
                  alert (x);
                  window.location.href = 'http://localhost/Annapoorna/Welcome_Page.php';
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>And my HTML</p>
  
  <pre><code>&lt;form class="login-form"&gt; 
      &lt;input type="text" placeholder="username" name="userID" id="userID"/&gt;
      &lt;input type="password" placeholder="password" id="password"/&gt;
      &lt;button id="login" name="login" value="login"&gt;Login&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The alerts are coming right but <code>window.location.href</code> is not redirecting to the specified page. Why?</p>