title: Javascript window.location.replace() does not redirect the web page
body: <p>I have a very simple script where window.location.replace() or window.location.assign() not working.</p>
  <pre><code>  function chartquery(){
      ticker=document.getElementById(&quot;queryticker&quot;).value;
      document.getElementById(&quot;queryticker&quot;).value =  ticker;
      jumptourl=&quot;http://127.0.0.1:5000/chart/&quot;+ticker;
      alert(jumptourl);
      window.location.replace(jumptourl);
    }
  </code></pre>
  <p>the HTML form is here:</p>
  <pre><code> &lt;form class=&quot;form-search&quot; onsubmit=&quot;chartquery()&quot;&gt;
      &lt;input id=&quot;queryticker&quot; type=&quot;text&quot; class=&quot;input-medium search-query&quot; style=&quot;text-transform:uppercase&quot;  placeholder=&quot;AAPL&quot; size=&quot;10&quot; onfocus=&quot;this.value=''&quot;&gt;
   &lt;/form&gt;
  </code></pre>
  <p>When I enter AAPL in the form and press enter, the function window.location.replace(jumptourl) does seem to force the browser to do some kind of http request but the new page does not jump to the &quot;jumpurl&quot; but just stay on the old url (<a href="http://127.0.0.1:5000/chart/MSFT" rel="nofollow noreferrer">http://127.0.0.1:5000/chart/MSFT</a>) with a new &quot;?&quot; added at the end (<a href="http://127.0.0.1:500/chart/MSFT?" rel="nofollow noreferrer">http://127.0.0.1:500/chart/MSFT?</a>).</p>
  <p>I must be doing some very silly.</p>