Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Special Interests > Web Design and Development
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread  
Old Jun 6, 2007, 05:20 PM   #1
chepistolas
macrumors member
 
Join Date: Apr 2005
Location: Chicago
Send a message via AIM to chepistolas Send a message via Skype™ to chepistolas
Javascript ?

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.
__________________

2.4 15" MBP 4GB Ram
1.33 17" Powerbook 10.4.11 1GB Ram
5.5G 80Gb & 4G 20GbIPOD (white)
chepistolas is offline   Reply With Quote
Old Jun 6, 2007, 05:30 PM   #2
angelwatt
macrumors 601
 
Join Date: Aug 2005
Location: Dayton, OH
Last I checked there's no "standard" way of setting it up so that it works across browsers and OSs.
angelwatt is offline   Reply With Quote
Old Jun 6, 2007, 06:32 PM   #3
mags631
macrumors 6502
 
Join Date: Mar 2007
Have you tried the window.print() method?

<input type="button" value="Print" onclick="javascript:window.print()" />
mags631 is offline   Reply With Quote
Old Jun 6, 2007, 06:35 PM   #4
snickelfritz
macrumors 65816
 
Join Date: Oct 2003
Location: Tucson AZ
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
__________________
2.4ghz 24" iMac (Aluminum); 4GB RAM; 320GB HDD; 250GB external G-Drive; 10.5.7; Adobe CS3.
snickelfritz is offline   Reply With Quote
Old Jun 6, 2007, 06:54 PM   #5
chepistolas
Thread Starter
macrumors member
 
Join Date: Apr 2005
Location: Chicago
Send a message via AIM to chepistolas Send a message via Skype™ to chepistolas
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.
__________________

2.4 15" MBP 4GB Ram
1.33 17" Powerbook 10.4.11 1GB Ram
5.5G 80Gb & 4G 20GbIPOD (white)

Last edited by chepistolas : Jun 6, 2007 at 07:07 PM.
chepistolas is offline   Reply With Quote

Reply

Mac Forums > Special Interests > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:52 PM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 2002-2009, MacRumors.com, LLC