Forum Moderators: not2easy
I'm making one now, and I'd like to know:
1. What is the safe cross browser method to invoke print via a link?
(Is this method safe? <a title="Print This Page" href="#" onclick="window.print()">Print This Page</a> )
2. Do all the operating system automatically apply the print style sheet when selecting "File...Print"?
3. Is there a standard way to test the print style sheet? I guess you can just change the media to screen temporarily to see how it looks? Or is there a method that is more likely to mirror the way it will print?
[edited by: Clark at 2:51 am (utc) on Feb. 15, 2008]
in the normal style sheet I simply add:
@media print {
.buttons, .interactive, #menu, #crum, .ads {display:none;}
}
This prevents the extra hit on the printsheet every time (browsers load it even when not printing, even when not using it to display)
As a button (if you need one):
<a href="/print.html" onclick="window.print();return false">
The print.html actually exists for those not having javascript turned on (it asks them to go back and to use the print function of their browser)
To test it: just preview your print from you browser.
Opera typically has easier ways to preview printing, handheld etc.
What I use:in the normal style sheet I simply add:
@media print {
.buttons, .interactive, #menu, #crum, .ads {display:none;}
}This prevents the extra hit on the printsheet every time (browsers load it even when not printing, even when not using it to display)
As a button (if you need one):
<a href="/print.html" onclick="window.print();return false">The print.html actually exists for those not having javascript turned on (it asks them to go back and to use the print function of their browser)
To test it: just preview your print from you browser.Opera typically has easier ways to preview printing, handheld etc.
Of course! Doh! Print preview.
Many thanks.