title: onclick window.location.href with input value
body: <p>I have an input and I want the user to be sent to another page with the input's value in the URI so that I can extract it.</p>
  
  <p>This is how my input is set up:</p>
  
  <pre><code>&lt;input name="date" id="datepicker" onchange="window.location.href = 'test.php?Date=' + document.getElementById("datepicker").value;"&gt;
  </code></pre>
  
  <p>Basically, when the date is changed, the date should be added onto the end of the URI and the user should be sent to test.php, where the value will be extracted. However, the value doesn't seem to be added on. </p>
  
  <p>What's the problem?</p>