print another page from the current page

already tested.
 $(document).ready(function(){  
 $('#printButton').click(function(evt) {  
   evt.preventDefault();  
   $('body').append('<iframe src="document_to_be_printed.php?param=value" id="printIFrame" name="printIFrame"></iframe>');  
   $('#printIFrame').bind('load',   
     function() {   
       window.frames['printIFrame'].focus();   
       window.frames['printIFrame'].print();   
     }  
   );  
 });   
 });  


reference : http://stackoverflow.com/questions/580781/how-to-print-another-page-from-the-current-page

Comments

Popular posts from this blog

Data Flow Diagram (DFD)

VERIFIKASI SUARA MENGGUNAKAN METODE MFCC DAN DTW MENGGUNAKAN METODE MFCC DAN DTW (BAB II TINJAUAN PUSTAKA)

flexigrid + php with add and edit button