This is a double barrelled question as I am having IE/Netscape problems. On my website, i have a "Printer Friendly" version button which opens the selected page in a new window without all the navigation, etc and with a print button at the bottom. That part works fine.
The code for the print button is as follows:
<IMG ID="Print" ALIGN="BOTTOM" BORDER=0 SRC="images/general/print.jpg" STYLE="cursor: hand;" onClick="window.print();">
The first problem is that the cursor style does not change to a hand in Netscape - works fine in IE5. Any ideas on this.
The second problem happens when you actually print the page. I don't want to the print the Print button when the page is printed. To this end, i added the following code:
function window.onbeforeprint()
{
// Hide the print button
document.getElementById("Print"
.style.display = 'none';
}
function window.onafterprint()
{
// Hide the print button
document.getElementById("Print"
.style.display = 'block';
}
Again, this works fine in IE but not in Netscape. Any advice would be greatly appreciated.
Mighty
The code for the print button is as follows:
<IMG ID="Print" ALIGN="BOTTOM" BORDER=0 SRC="images/general/print.jpg" STYLE="cursor: hand;" onClick="window.print();">
The first problem is that the cursor style does not change to a hand in Netscape - works fine in IE5. Any ideas on this.
The second problem happens when you actually print the page. I don't want to the print the Print button when the page is printed. To this end, i added the following code:
function window.onbeforeprint()
{
// Hide the print button
document.getElementById("Print"
}
function window.onafterprint()
{
// Hide the print button
document.getElementById("Print"
}
Again, this works fine in IE but not in Netscape. Any advice would be greatly appreciated.
Mighty