On Sun, 23 May 2004 10:09:27 +1000, in comp.lang.javascript "Russell
McDade" <do******************@all.com> wrote:
|
| I have a html page that I don't want anyone to print. Is there a way using
| JavaScript to send an alert to the user to warn [or stop] them from trying
| to print the html page? Is there an onPrint event handler? In my book
| 'JavaScript a Beginner's Guide' by John Pollock none is listed. Can a
| function be written that will execute if someone tries to print the html?
| Thanks in advance
|
| P.S. I also have a printable version of the page in pdf which is for
| printing
|
<head>
<link rel=alternate media=print href="mypage.pdf">
</head>
or
<style>
@media print {
..noPrint { display: none; }
}
</style>
<body>
<div class="noPrint">
....
</div>
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------