943,796 Members | Top Members by Rank

Ad:
Oct 23rd, 2006
0

Javascript printing

Expand Post »
I want a ".doc" file to be printed when you click on a hyperlink, however so far all i have been able to print is the page on which the link is situated, and not the doc file.

Im using this script:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <!-- Begin
  2. function printWindow() {
  3. bV = parseInt(navigator.appVersion);
  4. if (bV >= 4) window.print();
  5. }
  6. // End -->

In the page header:...

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <link rel=alternate media=print href="file.doc">

Now as far as im aware this should work in all browsers apart from netscape, however it doesnt work at all.

Does anyone know what i have done wrong here?

Thanks for your time,

NuGG
Similar Threads
Reputation Points: 10
Solved Threads: 1
Junior Poster
NuGG is offline Offline
110 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: "<SCRIPT SRC>" javascript logon help
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Please help a newbie - Javascript basic





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC