...

View Full Version : Print page (launch print version document)



babycam
11-12-2004, 01:05 AM
hi,
been looking for the code but cant find it.

i want to add a link to page "print this page" onClick i want it to open a hidden window(print version html document), then open the Print dialoge box so the user can select OK.

anyone???

Philip M
11-12-2004, 08:50 AM
<p align="center"><center><font size="1" face="Arial"><b><a href="#" onclick="javascript:window.print()">Click here to print this page</a></b></font></p>

Why make the user confirm what he has already requested, namely print the page?

glenngv
11-12-2004, 09:28 AM
http://www.siteexperts.com/tips/styles/ts41/page1.asp
http://www.4guysfromrolla.com/demos/printMediaCss.html

babycam
11-13-2004, 05:14 AM
http://www.siteexperts.com/tips/styles/ts41/page1.asp


Re: yeah this is exactly what i wanted - word document... the code in the HEAD worked fine... but i couldnt work out to link the "print this page" back to the code in the HEAD.

babycam
11-13-2004, 05:21 AM
http://www.jsmadeeasy.com/javascripts/DHMTL%20Miscelanious/Alternate%20Document%20For%20Printing/

Just found this...
So I misinterpreted what this code actually means. 1) u donít need a button saying "print this page", you just hit the browsers Print bttn and it werks....

thatís actually pretty shmick.

canadianjameson
11-14-2004, 06:30 AM
in the head of your document, put this:



<link rel=alternate media=print href="file_you_want_printed.html">


or as a link use this


<a href="file_you_want_printed.html" onClick="window.print();return false;">Print other Doc</a>

babycam
11-15-2004, 05:02 AM
in the head of your document, put this:



<link rel=alternate media=print href="file_you_want_printed.html">


or as a link use this


<a href="file_you_want_printed.html" onClick="window.print();return false;">Print other Doc</a>


OKAY. i've tried both codes and it still doesnt work... this is where i have put it....

<link rel=alternate media=print href"zprint_home.html">
</script>

</head>

***********************

doenst seem to work
www.finser.com.au

canadianjameson
11-15-2004, 05:46 AM
Did you try both at once?

check the source code of this page:

www.enviromark.ca/english/linecard.html

at the very top there is the first part, and the actual link is the print icon

tell me if you still cant get it working :)

aswell in the example you provided you're missing an = after the href

canadianjameson
11-15-2004, 05:51 AM
on a personal note, i checked the link you gave. do you have any other pictures of water like that.

i'm looking for some.

on the page i provided, if you click on the print icon it does print the alternative link



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum