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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Location
    San Antonio, TX
    Posts
    131
    Thanks
    1
    Thanked 0 Times in 0 Posts

    how to print a page from another page

    I am trying to have a print button that would print a text document (rules.txt) without actually bringing up the text document in the browser. (not by my request, but someone I am helping build their site...so please, no "WHY" questions on this one 'cause, I don't know.)

    I have no Idea of how to do this. This is some of what I have tried which has failed, so any help would be greatly appreciated...

    Code:
    <form>
    <input type="button" value="Rules Printout" onClick="window.print(rules.txt)";>
    </form>
    and I also tried this...

    Code:
    <a href="javascript:window.printrules.txt()";><img src="rules.gif"></a>

    Thanks,

    Imperial Spider

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,300
    Thanks
    203
    Thanked 2,561 Times in 2,539 Posts

  • #3
    Regular Coder
    Join Date
    Jan 2004
    Location
    San Antonio, TX
    Posts
    131
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up Thank You

    The info on that page is what I needed.

    Much appreciation...


    Imperial Spider


  •  

    Posting Permissions

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