Author |
Topic  |
|
bronee
Master
   
180 Posts |
Posted - 10 Jun 2013 : 21:13:08
|
How do I most easy create a printer friendly webpage in dynamic html editor?
/Bronée |
|
s.dav
Site Admin
    
Italy
3364 Posts |
Posted - 12 Jun 2013 : 08:33:06
|
I think the better approach is to keep the page simple |
Regards, Davide |
 |
|
bronee
Master
   
180 Posts |
Posted - 02 Jul 2013 : 17:27:28
|
Or this way. I did put this in HEAD:
<script language="javascript"> function Clickheretoprint(divname, titel) { var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,"; disp_setting+="scrollbars=yes,width=650, height=600, left=100,top=25"; var content_vlue = document.getElementById(divname).innerHTML; var docprint=window.open("","",disp_setting); docprint.document.open(); docprint.document.write('<html><head><title>'+titel+'</title><style>'); docprint.document.write ('a.printlink {display: none;}'); docprint.document.write('</style></head><body onLoad="self.print()">'); docprint.document.write(content_vlue); docprint.document.write('</body></html>'); docprint.document.close(); docprint.focus(); } </script> <style type="text/css"> a.printlink {float: right; display: block; margin-top: 30px;} </style>
And just made HTML like this:
<ul id="menu"> <li><a class="printlink" href="javascript:void(0)" onClick="Clickheretoprint('ldheLabel3', 'Print vindue') ", >PRINT OPSKRIFT</a></li> </ul>
Best regards, Lars |
 |
|
bronee
Master
   
180 Posts |
|
Jan van Londen
Super User
    
Netherlands
208 Posts |
|
|
Topic  |
|
|
|