title: After submitting a POST form open a new window showing the result
body: <p><a href="https://stackoverflow.com/q/133925">JavaScript post request like a form submit</a> shows you how to submit a form that you create via POST in JavaScript. Below is my modified code.</p>
  
  <pre><code>var form = document.createElement("form");
  
  form.setAttribute("method", "post");
  form.setAttribute("action", "test.jsp");
  
  var hiddenField = document.createElement("input");  
  
  hiddenField.setAttribute("name", "id");
  hiddenField.setAttribute("value", "bob");
  form.appendChild(hiddenField);
  document.body.appendChild(form); // Not entirely sure if this is necessary          
  form.submit();
  </code></pre>
  
  <p>What I would like to do is open the results in a new window. I am currently using something like this to open a page in a new window:</p>
  
  <pre><code>onclick = window.open(test.html, '', 'scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,status=no');
  </code></pre>