Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Print page?

  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    Ohio
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print page?

    I have searched and found a way to have a "Print this Page" link, but I was wondering if you can have a "Print Page" link for another page.

    I ask for the sake of not loading a PDF file but instead being able to print it from a normal html document.

    Possible or wishful thinking?

    Thanks.
    Kristen

    "Doctors bury their mistakes. Lawyers hang them. But journalists put theirs on the front page."
    --Anonymous

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    On main page add:

    Code:
    <a href="javascript: t=window.open('printpage.htm','','width=100,height=100,top=3000,left=3000'); setTimeout('t.window.close()',10000); t.blur(); window.focus();">Print</a>
    On printer version of the page add:

    Code:
    <script>
    function prnt() {
    if (window.print) {
    window.print();
    }
    }
    window.onload=prnt;
    </script>

  • #3
    New Coder
    Join Date
    Jul 2002
    Location
    Ohio
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks so much
    Kristen

    "Doctors bury their mistakes. Lawyers hang them. But journalists put theirs on the front page."
    --Anonymous

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Another option is:

    <link rel=alternate media=print href="printversion.doc">

    But unfortunately only IE!

  • #5
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi folks, haven't been here for a while, other commitments....

    However, I still know where to come to for good help ...

    I have searched and found this post and utilized the code posted by x_goose_x to good effect, but I have one question...

    When I click 'print' on the first page the browser print window is invoked but is not displayed, if you weren't expecting it you may not notice it has appeared in the taskbar. Is there any way I can get the browser print window to appear on the page where the 'Print' option is ?

    BTW, thanks for saving me loads of time trying to code this goose.

    Peanut.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •