SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict marylin77's Avatar
    Join Date
    Aug 2003
    Location
    Spain
    Posts
    362
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    to print with Javascript

    I know this Javascript code prints the current page:
    Code:
    "<a href=\"javascript:window.print()\">IMPRIMIR</a> ";
    What I am looking for is to print a page which is not the current one, so I need to address the pointer such as :
    Code:
    "<a href=\"javascript:file.txt.print()\">IMPRIMIR</a> ";
    I know it does not work, but you imagine what I mean.
    Is there anything similar to try?
    In short, I want to print a page which is not the current displayed in the screen with a simple clik on a button or on a hyperlink.
    Regards from Spain and thanks in advance.
    PD:umm... the word javascript is not well posted in my hyperlink <a href>...:[

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    The only way I could think of around this is to use frames or an iframe, load the page up in said frame, and print that frame.


Bookmarks

Posting Permissions

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