Advertisement
julong

JS_ready_printing

Aug 5th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. Print code :
  2.  
  3. function printing(){
  4. var printContents = document.getElementById('Giant9.com_Billing_printing').innerHTML;
  5. var popupWin = window.open('', '_blank', 'width=960,height=960,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no,top=55');
  6. popupWin.window.focus();
  7. popupWin.document.open();
  8. popupWin.document.write('<!DOCTYPE html><html><head><title>TITLE OF THE PRINT OUT</title>'
  9. +"<link media=\"all\" type=\"text/css\" rel=\"stylesheet\" href=\"http://giant9.com/a/dist/css/bootstrap.min.css?version=2.1a\">"
  10. +'</head><body onload="window.print(); window.close();"><div>'
  11. + printContents + '</div></html>');
  12. popupWin.document.close();
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement