Button to click to print multiple documents from a webpage

Discussion in 'JavaScript' started by Stasia, Mar 28, 2008.

  1. #1
    Greetings

    I have an intranet site set up with Dreamweaver. This site consists of groups of links which open documents which are stored on our network.

    I would like to create a button which, when clicked, would send an entire group of these documents to a printer or open a printer dialogue window because it would not always be the same printer. This would save the user the trouble of clicking on each link in this group and waiting for the document to open and then having to click on the print button.

    I have already created a button using the following code: INPUT TYPE="button" NAME="myButton" VALUE="Click to Print Entire Packet" onClick="clickFunction"> Now I just need to assign the "Print" action to the button.

    Any feedback would be greatly appreciated.

    Stasia from Wisconsin
     
    Stasia, Mar 28, 2008 IP
  2. Finney

    Finney Peon

    Messages:
    458
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Javascript can only be used to print the actual page it is currently on.

    Hope you get a way around it.
     
    Finney, Mar 28, 2008 IP
  3. So1

    So1 Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If u want to print many documents, u've to use AJAX to get data from that documents. Then u've to parse them and shape into one document on the page. And then when u have shaped data for print use function window.print();

    It seems to me, no more choice ;-) OR other methods'll be much less useability.

    Kirill from Vladivostok :D
     
    So1, Mar 28, 2008 IP
  4. Stasia

    Stasia Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    So1

    Thank you for your reply. Could you please point me in the direction of some AJAX code that I could investigate and see if I can figure this out?

    Thank you Finney for your reply as well. Everything else that I have found out about printing with Javascript indicates that it can only be used to print the actual page it is currently on so I will not waste any more time going down that road.

    Thanks again
    Stasia
     
    Stasia, Mar 31, 2008 IP
  5. Finney

    Finney Peon

    Messages:
    458
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you want to put your word documents into HTML I have an idea of how to print them all :)
     
    Finney, Apr 1, 2008 IP