title: in php javascript window.location.href not working on submit button?
body: <p>In PHP JavaScript <code>window.location.href</code> is not working on <code>submit</code> button. The problem is that function <code>order()</code> is not going on submit button. I have tried <code>alert('');</code> message also.</p>
  
  <p>I want when order button submitted, then form submits and user is redirected to login.php</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    function order() {
      var sStr1 = "login.php";
      window.location.href = sStr1;
      return false;
    }
  &lt;/script&gt;
  
  &lt;input type="submit" class="button4" name="order" id="order" value="Place Order" onclick="order()" &gt;
  </code></pre>