1

This is the first time I'm using the following Javascript coding in HTML5, but my printed page is always blank and shows "about:blank". Can anyone maybe help me? The button I coded is the following:

<a href="javascript:window.print()" class="icon-button print" target="LINK TO ANOTHER PAGE"><i class="icon-printer"></i><span></span></a>

Daniele D.
  • 2,624
  • 3
  • 36
  • 42
MC0REBE
  • 13
  • 1
  • 3
  • Possible duplicate of [How do I print different page using javascript/jQuery/ajax?](http://stackoverflow.com/questions/23707251/how-do-i-print-different-page-using-javascript-jquery-ajax) – Andrew Oct 24 '16 at 08:15
  • here is soution http://stackoverflow.com/questions/2578052/printing-contents-of-another-page – marcus Oct 24 '16 at 08:18
  • That didn't do the trick sadly. – MC0REBE Oct 24 '16 at 08:22
  • Can you explain what "the trick" is? What do you want to happen? What actually happens? – evolutionxbox Oct 24 '16 at 08:29
  • I want the user to click the button so another page prints immediatly. Right now an empty tab opens and prints a blank page. – MC0REBE Oct 24 '16 at 08:42

1 Answers1

-1
the print function prints the content of the actual page, 
to print the other page you have to to execute the print on the load of that page like this :
<body onload="window.print()">
SIE
  • 155
  • 1
  • 3