View Full Version : Javascript ?
chepistolas
Jun 6, 2007, 05:20 PM
I have a problem. . I can't seem to find a way to put a print command on my site. Do print commands even use javascript? Can anyone please give me advice or point me to a website that dosen't concentrate on using I.E 4. Thanks in advance. Luis Gomez.
angelwatt
Jun 6, 2007, 05:30 PM
Last I checked there's no "standard" way of setting it up so that it works across browsers and OSs.
mags631
Jun 6, 2007, 06:32 PM
Have you tried the window.print() method?
<input type="button" value="Print" onclick="javascript:window.print()" />
snickelfritz
Jun 6, 2007, 06:35 PM
The method I use, is to create "printer friendly" documents in PDF for the pages that will likely need to be printed, then embed the File>Print action into the document pages using Indesign and Acrobat Pro.
I use print resolution (175ppi or so) PNG8(line art) or PNG24(continuous tone) for placed graphics, for fast download and good quality prints.
PDF format is "press-ready", with no image compression.
The indesign PDF is opened in Acrobat Pro and the desired actions embedded in the pages.
The "Print page" link on the site opens the PDF, and the printer dialog appears automatically.
GL
chepistolas
Jun 6, 2007, 06:54 PM
I've tried the window.print() but it shows up as a button. I want it to display withouth the button, so users see it as a link instead.
<div id="afterarticle">
<span class="discuss"><a href="/forum/article"> discuss</a></span>
<span class="email"><a href="emailform.html" rel="gb_page_fs[]"> e-mail</a></span>
<span class="print"><a href="{javascript code ?}"> print</a></span>
</div>
EDIT:
I've GOT IT! !
for those of you who would like to make it look like a link just make it like this:
<a href="javascript:window.print()"> print</a>
There is a problem though, it prints the page into two pages.
vBulletin® v3.6.10, Copyright ©2000-2009, Jelsoft Enterprises Ltd.