Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer Friendly version...

Status
Not open for further replies.

GUJUm0deL

Programmer
Jan 16, 2001
3,676
US
Just a thought, is it possiable to have a printer-friendly kind of script done via Javascript or CSS or anything like that?? I found a site ( that has the printer friendly script but it's in CGI and i'm not familiar with CGI so I can't read it or manipulate for my beniefit...
Thanks for the help... I have not failed; I merely found 100,000 different ways of not succeding...
 
In IE, you can do manipulations with the onbeforeprint and onafterprint events. I think mozilla (ie too?) supports different style sheets for screen and print, defined as such:

<style media=&quot;print&quot;>
//some stuff
</style>

<style media=&quot;screen&quot;>
//some stuff
</style> jared@eae.net -
 
You have to put in in the body and it displays a :

<form>
<p><input type=&quot;button&quot; name=&quot;printWhole&quot; value=&quot;Print&quot; onClick=&quot;parent.print()&quot;></p>
</form>

If using frames you need to:

****Create 1 page w/ the frame that you will probably have the navigation in:
<HTML>
<HEAD>
<TITLE>window.print() method</TITLE>
</HEAD>
<FRAMESET ROWS=&quot;25%,75%&quot;>
<FRAME NAME=&quot;controls&quot; SRC=&quot;buttonpage.htm&quot;>
<FRAME NAME=&quot;display&quot; SRC=&quot;contentpages.htm&quot;>
</FRAMESET>
</HTML>

****Create another page (this is called buttonpage.htm in the code above):
<HTML>
<HEAD>
<TITLE>Print()</TITLE>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE=&quot;button&quot; NAME=&quot;printWhole&quot; VALUE=&quot;Print Entire Frameset&quot; onClick=&quot;parent.print()&quot;><P>
<INPUT TYPE=&quot;button&quot; NAME=&quot;printFrame&quot; VALUE=&quot;Print Bottom Frame Only&quot; onClick=&quot;parent.display.print()&quot;><P>
</FORM>
</BODY>
</HTML>

****Then create your content pages and enter the page name in the first code your wrote for DISPLAY
Line reads: <FRAME NAME=&quot;display&quot; SRC=&quot;contentpages.htm&quot;>

If you want I can e-mail you a sample of the pages just send me an e-mail and I'll send you the zip

Hope this helps s-)
Jay
Get The Exposure Your Web Site Deserves
 
jayphilips, if you don't mind can you email it to me?? My e-mail is: imajin_arts@hotmail.com
Thanks... I have not failed; I merely found 100,000 different ways of not succeding...
 
Hi GUJUm0deL,

Sorry about taking so long to get back to you, I've been really busy. Do you still want me to e-mail you the code? Jay
Get The Exposure Your Web Site Deserves
 
jayphilips, sure if you still don't mind...my email is: imajin_arts@hotmail.com
Thanks... I have not failed; I merely found 100,000 different ways of not succeding...
 
Hi GUJUm0deL,

I e-mailed the zip file to you containing the three htm pages you need. I thought I'd let you know ahead of time so you can expect an e-mail with an attachment. (I didn't know if you were like me where I never open attachments from people I don't know).

I hope this is the code you were looking for, if you have any questions or need help just let me know.

jayphilips@sewizard.com Jay
Get The Exposure Your Web Site Deserves
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top