title: form.submit() truncating string with '?'
body: <p>I have a JavaScript function :</p>
  
  <pre><code>function post(aAction) {
      var form = document.createElement("form");
      form.action=aAction;
      document.body.appendChild(form);
      form.submit();
      alert(form.action);
  }
  </code></pre>
  
  <p>( I'm an experienced developer but not much experience with JScript - lifted that <code>post()</code> function from some website. )</p>
  
  <p>I am passing this string into the function: A URL with query information: <br/></p>
  
  <pre><code>http://testServer:3072/aQuerySite.dll/GetErrors?server=server1:5678
  </code></pre>
  
  <p>This URL returns a page listing error messages from the specified server: <code>"server1:5678"</code>  - an argument passed to a server side query as <br/></p>
  
  <blockquote>
    <p>server=server1:5678</p>
  </blockquote>
  
  <p>in the URL.</p>
  
  <p>If I paste that URL directly into a browser and post it, the correct page with appropriate data is returned, and the browser address shows the complete URL as it was sent.</p>
  
  <p>But when I pass the URL into my function, I get back a correctly formatted page but no records, and the browser address shows the URL truncated after the <strong><code>?</code></strong> token : <br/> <br/> <strong><code>http://testServer:3072/aQuerySite.dll/GetErrors?</code></strong>  <br/> <br/> The page returns showing no records because the query parameters after <strong><code>?</code></strong> never got to the server for evaluation - query runs looking for nothing.</p>
  
  <p><code>alert(form.action)</code> in the function, which I added for debugging, shows the correct URL with query arguments, as does my debugger (WebStorm) and as mentioned, if I hit the URL directly from the browser, I get the correct result. I can only conclude that my URL is getting truncated in the <strong><code>form.submit()</code></strong> call.  </p>
  
  <p>This happens in IE, FireFox and Chrome. I also tried using <code>&amp;#63;</code> for "?" - same result.</p>
  
  <hr>
  
  <p>Why is this happening? How can I fix it? </p>