title: automatically printing page on form submit
body: <p>i have been using the below code to automatically print out a form on submission but the problem i have encountered is that upon navigating away from the page, the "Submit - And Print" button stops working.</p>
  
  <p>Secondly is there a way to bypass the print dialog on internet explorer/google chrome and allow the form to print automatically and the send the request to the printer automatically? there is also a need to remove all headers and footers from the pages pritned (i.e. internet explorer web page printing defaults). </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script language="javascript" type="text/javascript"&gt;
  
  function PrintMeSubmitMe()
  {
  window.print();
  SubmitMe();
  }
  
  function SubmitMe()
  {
  document.MyForm.submit();
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form name="MyForm" action="somepage.asp" method="post"&gt;
  &lt;input type="button" value="Submit - No Print" onclick="SubmitMe()"&gt;&lt;br /&gt;
  &lt;input type="button" value="Submit - And Print" onclick="PrintMeSubmitMe(this)"&gt;&lt;br /&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <hr>
  
  <p>i have come to realise that the "submit - and print" bug occurs on google chrome only and not internet explorer</p>