That fails on IE5/Mac. And it will fail to appear in any modern browser
unless it is enclosed in <form> tags.
I usually do this -
<button value="Print this" onClick="alert('Please use File | Print on your
browser's menu')>Print this</button>
But seriously, here's about the best you can do -
Put this in the head of the document -
<script type="text/javascript">
function print_page(where){
var is_mac=(navigator.platform.indexOf("ac") != -1);
(document.all && is_mac)?
alert("Select \"Print\" from the menu") : where? where.window.print() :
window.print();
}
function writeOutPrintLink(){
document.getElementById('printLink').innerHTML = '<a
href="javascript

rint_page();">Print this</a>'
}
</script>
Adjust the body tag of the document as follows -
<body ... onload="writeOutPrintLink();"> (where the ellipsis indicates
already existing attributes, if any)
<span id="printLink"></span>
That way, the link only shows up if you have javascript enabled.