PDA

View Full Version : print this page script


fmh002
06-29-2003, 02:50 PM
hello,

i am looking for something which is not entirely the following:

<input type="button" value="Print" Onclick="print()" ;>

<a href="javascriptrint()">Print</a>

i wanted to have a [ print this (friendly version) ] page that would display the content separately and then the user could print the page using the above script. i need your help.

thnx in advance,
fmh002

Whitesword
06-29-2003, 09:41 PM
Basically, you have to generate an extra page with the printer friendly stuff on it... leave out all the background colours and nice big graphics and anything else that chews up printer ink and just get down to basics. Must be reasonably easy to read. Have a look at what this site generates and go from there.


Oh yeah, almost forgot...
<a href="printerfriendly.asp?ref=<%=Request.ServerVariables("URL")%>"> is something like what you want to use


Hope this helps :)

Cheers
Whitesword

Bullschmidt
06-30-2003, 01:01 AM
And the following could be used for a page break (works in IE and Netscape Nav 6):
<tr style="page-break-before:always">
OR
<p style="page-break-before:always">
And for some reason align="left" (which is unnecessary anyways as the default is left aligned) in any table which this is within (directly or indirectly) means the page break doesn't work.