Print selected content from a webpage
This is an alternate to my post Javascript Print Page Area . Try this.
<script>
function cmdPrint()
{
var windowsettings = ” tollbar=yes,location=no,scrollbar=yes,width=600,height=500,left=100,top=50″;
var printcontent=document.getElementById(‘printerContent’);
var popupcontroler = windo.open(“”,””,windowsettings);
popupcontroler.document.open();
popupcontroler.document.write(‘<html><head><title>Printer Dilog</title>);
popupcontroler.document.write(‘</title><body onload=”self.print()”><div align=”center”>’);
popupcontroler.document.write(printcontent);
popupcontroler.document.write(‘</div></body></html>’);
popupcontroler.document.close();
</script>
Wrap your webpage content that need to be print with an id “printerContent”
<div id=”printerContent”>This is a test print. This is a test print. This is a test print. This is [...]

