I have developed a web application and in my web page there are some data displays with
common headers, footers , menus and other images. so I have added a small button as print
preview so that user only can see data. After user click on print preview button only data display
as a popup and in that popup I added a button call print so that user can click on it and take a print out of that page.
this print button directly call to window.print() in onClick event and it working fine I can get the print outs.
but my problem is in my printed page on top of that I can find the "Print" text which is button caption and in above that
I can find the url which is something http://localhost/..............
So is there a way that I can remove those print text and url from my printed page.
Many Thanks
this is what the print preview button do .
function printPreView(reportCategory,reportType,transactionType,searchOption,customerRokaID,utilityCompany,fromDate,toDate,telcoName,bank){
var request = "selectedMenu="+reportCategory+"&loginStatus=success&criteria="+searchOption+"&customer="+customerRokaID+"&from="+fromDate+"&to="+toDate+"&nspTypes="+utilityCompany+"&trxTypes="+transactionType+"&options="+reportType+"&telcoTypes="+telcoName+"&bankTypes="+bank+"&printable=yes";
window.open ("report/showReport.action?"+request,null,"location=no,menubar=0,resizable=1,scrollbars=1,width=600,height=700");
}
Here is how I have put my Print button
<form>
<input type="button" value="Print" onClick="window.print() ">
</form>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…