You need to sign in to do that
Don't have an account?
Seth
PrintAnything, Style Sheets, Print Button
I have been able to successfully get PrintAnything to format data as necessary, but am having some troubles with one of the finishing touches:
In order to allow people to easily print the output, I've added a javascript "Print" button. The problem is, however, that since PrintAnything does not accept stylesheet calls (I need to call a "media" stylesheet in this case), I am unable to use javascript code to "hide" the print button when the document is actually printed.
This means that every printout has a big "Print" button on it, which is obviously less than desirable.
Has anyone figured a way around this?
Thanks,
Seth
In order to allow people to easily print the output, I've added a javascript "Print" button. The problem is, however, that since PrintAnything does not accept stylesheet calls (I need to call a "media" stylesheet in this case), I am unable to use javascript code to "hide" the print button when the document is actually printed.
This means that every printout has a big "Print" button on it, which is obviously less than desirable.
Has anyone figured a way around this?
Thanks,
Seth
Add this to the Print Anything Driver s-control:
( It goes near the bottom of the page inside the css tag )
Code:
And then in your template, just add the "hidden" class to anything you want to hide when you print the page.
For example:
Code:
-- Seth
Message Edited by sduda on 04-03-2007 06:35 PM
Here is my current solution.
<div id="printdiv"><form id="printform"><input id="printbutton" type="button" value="Print" onclick="printdiv.style.display='none';window.print();printdiv.style.display='inline'" /></form></div>