I have developed a web application and there are some data displays on my web page with common headers, footers, menus and other images. so I added a small button as a printout so that the user can see the data. After the user clicks on the print preview button, only the data is displayed as a pop-up window, and in this pop-up window I added a button call print so that the user can click on it and print this page.
this print button directly calls window.print () in the onClick event and works fine, I can get printouts.
but my problem is on my printed page, on top of which I can find the text "Print", which is the label of the button and above, I can find the url something http://localhost/..............
So, there is a way to remove these printed texts and URLs from my printed page.
Many thanks
this is what the print preview button does. A.
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"); }
This is how I put my print button
<form> <input type="button" value="Print" onClick="window.print() "> </form>