Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued Products: Article Manager 1 Add-ons:
Tutorial : Getting your "Printer Friendly Version" to open in a new, smaller window

 

 


Cliff
Staff


Jan 9, 2006, 11:50 AM

Post #1 of 1 (2649 views)
Shortcut
     Tutorial : Getting your "Printer Friendly Version" to open in a new, smaller window  

Hi All!

If you are looking to have your printer friendly page open up in a new, smaller window, I've put together a little tutorial for you. There are a just couple things that you need to do in order for this to work, and I'll go over them one at a time.

1. Download the /templates/article/default.html file from your server to your computer and open it with the HTML editor of your choice.

2. Switch over to the HTML view and add the following JavaScript to the <head> section of the the template:


Code
<script> 
<!--
function PopUp(page) {
window.open(page,"printer","top=150px,left=100px,width=600px,height=580px," +
"toolbar=no,menubar=no,location=no,status=no,directories=no,scrollbars=yes,resizable=yes");
return true;
}
// -->
</script>


Note that you can adjust the width and height of the popup window in here.

3. Change the link to the printer friendly page from this:

<a href="$art_printer_url$">Printer&nbsp;friendly&nbsp;page</a>

to this :

<a href="$art_printer_url$" target="_blank" onClick="PopUp('$art_printer_url$'); return false;">Printer&nbsp;friendly&nbsp;page</a>

4. Save the template, re-upload it to the server and re-publish your articles for the change to take effect.

Now when you click on the 'Printer friendly page' it will open in a new and smaller window.Smile

If you wanted to make things really easy for the users to print the articles, you can just add this code to the /templates/article/default_printer.html file :


Code
<script language="Javascript1.2"> 
<!--
var message = "Print this Page";

function printpage() {
window.print();
}

document.write("<form><input type=button "
+"value=\""+message+"\" onClick=\"printpage()\"></form>");

//-->
</script>


I've attached a couple templates for you as working examples if you need them. Give this a whirl and let me know how things go for you or if you need any advise Cool
Regards,
Cliff Stefanuk - Customer Service Manager
support@interactivetools.com


(This post was edited by Cliff on Jan 10, 2006, 9:15 AM)
Attachments: default_printer.html (1.86 KB)
  default.html (3.99 KB)

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4