homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Printing out an Alternate .Doc file
Print out Doc file using Javascript

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


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




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

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)

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)


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


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved