Welcome to WebmasterWorld Guest from 54.196.127.58

Forum Moderators: open

Message Too Old, No Replies

Printing out an Alternate .Doc file

Print out Doc file using Javascript

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

Junior Member

10+ Year Member

joined:Oct 1, 2002
posts:83
votes: 0


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

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

Administrator from US 

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

joined:Sept 21, 1999
posts:38070
votes: 16


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?
7:00 am on Mar 24, 2003 (gmt 0)

Senior Member

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

joined:Mar 15, 2002
posts:6807
votes: 0


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 ...

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

Junior Member

10+ Year Member

joined:Oct 1, 2002
posts:83
votes: 0


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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members