Click to See Complete Forum and Search --> : Print Function


dough
11-17-2003, 02:46 PM
Is there a print function that will allow everything on a screen except for action buttons to be printed?

fredmv
11-17-2003, 02:51 PM
Welcome to the forums.

Yes - there is - the answer lies in CSS; not JavaScript, however. It can be as simple as this:<style type="text/css">
@media print {
.hide {
display: none;
}
}
</style><input type="button" value="Print" onclick="if(typeof print != 'undefined') print();" class="hide" />Good luck.

dough
11-18-2003, 09:14 AM
That worked. Thanks

fredmv
11-18-2003, 09:23 AM
No problem. ;)