title: How to pass parameter to another page and print the content
body: <p>I am going to print a page without loading that page. As I searched in stack overflow I found the following example the best. </p>
  
  <p>But the problem here is that I cannot pass any parameter using the <code>src</code> attribute. </p>
  
  <p>Now, I am looking for a way to pass a <strong><em>parameter</em></strong> to an <strong><em>external page</em></strong> and then <strong><em>print</em></strong> that page without loading that page. </p>
  
  <p>If anyone can help me I will be thankful but please do not mark my question as a duplicated question. </p>
  
  <pre><code>&lt;html&gt; 
  &lt;head&gt; 
  &lt;title&gt;Index&lt;/title&gt; 
  &lt;script src="http://code.jquery.com/jquery-1.4.3.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
      $('#loaderFrame').load(function(){
          var w = (this.contentWindow || this.contentDocument.defaultView);
          w.print();
      });
  
      $('#printerButton').click(function(){
          $('#loaderFrame').attr('src', 'print.php');
      });
  });
  &lt;/script&gt;
  &lt;style&gt;
   #loaderFrame{
      visibility: hidden;
      height: 1px;
      width: 1px;
   }
   &lt;/style&gt;
   &lt;/head&gt; 
   &lt;body&gt; 
   &lt;input type="button" id="printerButton" name="print" value="Print It" /&gt;
  
   &lt;iframe id="loaderFrame" &gt;&lt;/iframe&gt;
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>