title: how do I print a html form along with its contents
body: <p>I made and form along with a button to print the form.  The form gets printed BUT none of the user input shows up.  Is there some way to include the user input?</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;!-- InstanceBegin template="/Templates/Template_plain.dwt" codeOutsideHTMLIsLocked="false" --&gt;
  &lt;head&gt;
  
  
  
  &lt;!-- this code from stackoverflow http://stackoverflow.com/questions/2255291/print-the-contents-of-a-div --&gt;
  
  &lt;script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" &gt; &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
      function PrintElem(elem)
      {
          Popup($(elem).html());
      }
  
      function Popup(data) 
      {
          var mywindow = window.open('', 'my div', 'height=400,width=600');
          mywindow.document.write('&lt;html&gt;&lt;head&gt;&lt;title&gt;my div&lt;/title&gt;');
          /*optional stylesheet*/ //mywindow.document.write('&lt;link rel="stylesheet" href="main.css" type="text/css" /&gt;');
          mywindow.document.write('&lt;/head&gt;&lt;body &gt;');
          mywindow.document.write(data);
          mywindow.document.write('&lt;/body&gt;&lt;/html&gt;');
  
          mywindow.document.close(); // necessary for IE &gt;= 10
          mywindow.focus(); // necessary for IE &gt;= 10
  
          mywindow.print();
          mywindow.close();
  
          return true;
      }
  
  &lt;/script&gt;
  
  &lt;!-- end code from stack overflow --&gt;
  
  &lt;/style&gt;&lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;p&gt;Complete this form&lt;/p&gt;
  
  &lt;div id="container" style="border: 2px solid; width: 600px; padding: 5px;"&gt;
  
  
    &lt;form&gt;
      Name:&lt;br/&gt;
      &lt;input type="text" name="F_Name" size=60&gt;
      &lt;br/&gt;&lt;br/&gt;
      Street Address:&lt;br/&gt;
      &lt;input type="text" name="F_Address" size=30&gt;
      City:
      &lt;input type="text" name="F_City" size=12&gt;
      State:
      &lt;input type="text" name="F_State" size=2&gt;
      Zip Code:
      &lt;input type="text" name="F_ZipCode" size=5"&gt;
      &lt;br/&gt;&lt;br/&gt;
      &lt;input type="reset" value="Reset"&gt;
      &lt;br/&gt;&lt;br/&gt;
  
  &lt;/form&gt;
  &lt;!-- end #container --&gt;
  &lt;/div&gt; &lt;!-- end #container --&gt;
  
  &lt;input type="button" value="Print Form" onclick="PrintElem('#container')" /&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>