I have created JS Code for Printing Single Id's . When ever i try to Print Document Print button is Also comes in Preview. i tried Every Possible Solution But nothing Is Worked
i tried
@media print {
.noprint {
visibility: hidden;
}
}
But No Results
Here Is My js code
function bookListPrintOnlyId(bookid) {
var popupWin = window.open('', '', 'width=700,height=700');
popupWin.document.open();
popupWin.document.write('<html><head><title></title>');
popupWin.document.write('<link href="{$resourcePath}assets/css/customprint.css" rel="stylesheet" type="text/css" />');
popupWin.document.write('</head><body ><div id="printabelDivOutput" class="printabelEquipmentsDivOutput"><table class="table table-striped table-bordered table-responsive"><thead class="table-vertical-header" style="height: 56px;"><tr><th style="width: 130px;" class="text-center"><span class="header-cell">Equipment ID</span></th></tr></thead><tbody>');
popupWin.document.write('<tr><td class="text-center">'+bookid+'</td></tr>');
popupWin.document.write('<tr><td class="text-center"><button onclick="window.print()" class="noprint">Print</button></td></tr>');
popupWin.document.write('</tbody></table></div></body></html>');
popupWin.document.close();
}