Welcome to WebmasterWorld Guest from 54.144.77.26

Forum Moderators: open

Message Too Old, No Replies

Printing out an Alternate .Doc file

Print out Doc file using Javascript

     

walker

10:03 am on Mar 21, 2003 (gmt 0)

10+ Year Member



Hi

Does anyone know how to print out a word.doc from a hyperlink on a page in frames. The document would somehow need to be loaded in the background to avoid the "would you like to OPEN or SAVE this doc popup.

This works on a page outside of frames only, and brings up the prompt box to save as or open.
<link rel=alternate media=print href="printversion.doc">

Any assistance would really be welcomed here.

Kind Regards

Walker

Brett_Tabke

10:51 pm on Mar 23, 2003 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Just for reference: you do realize that only works with ie6, and only if the target computer is set to handle doc files via Word?

DrDoc

7:00 am on Mar 24, 2003 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Without going into details (since that's outside the scope of this forum) ... it can't be done.

What you can do is provide a link to a Word document, stating that it is such a document (including version number) so they can download/print if they want.

Otherwise (and for users who don't have Word/IE/Windows), you just have to settle for a regular print CSS file ...

walker

9:50 am on Mar 24, 2003 (gmt 0)

10+ Year Member



Hi

I worked it out myself, the way to print out the alternate Doc file in frames is to place the following line in the head of the Parent frames html

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

Then place a link on any of the child frames eg:

<a onclick="window.print();return false" style="text-decoration:none;cursor:hand">Print Brochure</a>

On some PCs(but not all) depending on Internet speed connection and or Security settings it will ask you to Open the file (loads strait for printer to print and not into a window or Word)

This has only been tested in IE however for my own purposes this is good enough as 99% of the customers visiting the site use IE

Hope this is of interest to someone!

Kind Regards

Walker