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
  1. #1
    New Coder
    Join Date
    Dec 2004
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript:window.print() question

    Alright is it possible to modify the javascript:window.print() script to print a different file then what you are seeing. What I am trying to accomplish is to print a "printer friendly" version of a page from the normal page without having to display it then print it. Is that possible to do with that script or any other. Give ya a heads up I know extremely little about javascript so any help is appreciated. Thanks

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Last edited by glenngv; 12-07-2004 at 01:11 AM.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    New Coder
    Join Date
    Dec 2004
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The first link there does pretty much what I'm looking for. However when I tried to print it, It opened up a message box to download the file first. Anyway around that?

  • #4
    New Coder
    Join Date
    Dec 2004
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nevermind. I found if you link it to a .html/.htm file it works without the download. Thanks a million!!!

  • #5
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    put this up in your head

    Code:
    <link rel=alternate media=print href="print_linecard.html">
    and use this as your print link:

    Code:
    <a href="print_linecard.html" onClick="window.print();return false;">Print me</a>
    just change the urls, of course
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)


  •  

    Posting Permissions

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