title: How to pass javascript textBox value to URL as parameter
body: <p>I would like to pass the value from a date and time picker as a parameter to a URL. This is what I have:</p>
  
  <pre><code>&lt;div style="text-align:left; margin:8px 5px auto;"&gt;
          &lt;label for="dt_id"&gt;Please enter a date and time &lt;/label&gt;
          &lt;input type="Text" id="dt_id" maxlength="25" size="25"/&gt;
          &lt;img src="../../js/datetimepicker/images2/cal.gif" onclick="javascript:NewCssCal('dt_id','yyyyMMdd','arrow','true','24')" style="cursor:pointer"/&gt;
          &lt;input type='button' onclick='setURL()' value='SUBMIT'&gt; 
  &lt;/div&gt;
  
  &lt;script&gt;
  var dt_value = document.getElementById("dt_id").value;
  var sjdurl =  "/path/script?datetime="+dt_value;
  &lt;/script&gt;
  </code></pre>
  
  <p>However, the URL does not include the date value. </p>