Knowledgebase

Home » Item #710

Print This Page Button

Item: #710
Date: 25 Nov 2003
Applies to
v5

Question

How would I add a 'print this page' button to the site? I have tried adding JavaScript but I can't find where to add it. Any Ideas?

Answer

This can all go in the skin HTML file. Any javascript functions can be put straight in to the <head> tag there, and that way they'll be accessible from every front-end page.

However, in the case of a 'print this page' feature, you don't really need a javascript function by called the javascript:window.print() function. You can use this in either a button or a link. For example:

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

<FORM>
<input type="button" value="Print Me!" Onclick="window.print()">
</FORM>
Will produce the following:

Print Me!




You can put this in your skin to have the feature on every page.

For more information regarding modifying the skin, take a look at KB#272, KB#698 and KB#15.

Can't find the answer you need? Click here to open a support ticket.

« Back