Javascript printing

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Feb 2005
Posts: 92
Reputation: NuGG is an unknown quantity at this point 
Solved Threads: 1
NuGG's Avatar
NuGG NuGG is offline Offline
Junior Poster in Training

Javascript printing

 
0
  #1
Oct 23rd, 2006
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
Pubonwheels - Mobile Bar Services for the South West of England.
The Kings Head Inn - The Kings Head, Underhill, Coleford, Somerset, UK.
South West Ravers - Going out to all you jungle drum and bass ravers.
UFB Live Radio - Keep It Locked.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC