Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: DocBuilder:
Printing pages

 

 


MayDay
User

Aug 23, 2004, 3:54 PM

Post #1 of 4 (6946 views)
Shortcut
Printing pages Can't Post

Hello,
I want to be able to let viewers print a page. Only the title and content area need to print. Since the program uses frames, the typical print button doesn't print the correct frame. Any suggestions?
Thanks for your help.

Robert


Theo
Project Manager / Moderator


Aug 24, 2004, 4:13 PM

Post #2 of 4 (6914 views)
Shortcut
Re: [MayDay] Printing pages [In reply to] Can't Post

Robert,

I found a little javascript widget for you from http://javascript.internet.com/miscellaneous/print-frame.html. Here are the instructions:
  1. Paste this code into the Head of the _doc_page.html template:

    Code
     <script>  
    // (C) 2004 www.CodeLifter.com
    // Free for all users, but leave in this header
    function framePrint(whichFrame){
    parent[whichFrame].focus();
    parent[whichFrame].print();
    }
    </script>

  2. Paste this code into the BODY of of the _doc_page.html template:

    Code
     <a href="javascript:framePrint('content');">  
    Click Here to Print
    </a>

Works like a charm. :)


Theo Wiersma
Project Manager

(This post was edited by Theo on Aug 26, 2004, 11:42 AM)


MayDay
User

Aug 26, 2004, 11:20 AM

Post #3 of 4 (6765 views)
Shortcut
Re: [Theo] Printing pages [In reply to] Can't Post

A tidy solutiont to the frames problem! Thanks alot! One minor note: it doesn't work when browsing from my Mac. But Mac users are used to being left out. There is another soloution using PHP that is a little more complicated. I have not implemented it but the script can be found at http://www.mikenew.net/printfriendly.php

Thanks again.

Robert


Theo
Project Manager / Moderator


Aug 26, 2004, 1:43 PM

Post #4 of 4 (6746 views)
Shortcut
Re: [MayDay] Printing pages [In reply to] Can't Post

Thanks for the tip, Robert! :)


Theo Wiersma
Project Manager