Forum Moderators: open

Message Too Old, No Replies

Help with printing and external javascript file

Beginner's questions

         

mic089

8:51 am on Feb 22, 2008 (gmt 0)

10+ Year Member



I have a created a text only print stylesheet and would like to add a "print this page (text only)" link to every page. If I add

<script type="text/javascript" src="/print.js"></script>

to the <head> of my blog template, can anyone help with the following questions:

What should I include in the print.js file?
Do I save the file in the html folder on my server?
What code will I need to place in the position that I want the "print this page" link to appear?

Hopefully I am going about this the correct way...thank you in advance for any assistance or suggestions.

le_gber

3:43 pm on Feb 22, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you could use a simple link like:

<a href="javascript:window.print();">Print this page</a>