View Single Post
  #7   Spotlight this post!  
Unread 24-08-2004, 20:25
KathieK's Avatar Unsung FIRST Hero
KathieK KathieK is offline
Sometimes FIRST makes my head hurt!
no team
 
Join Date: Apr 2003
Rookie Year: 2002
Location: Rockville, CT
Posts: 3,681
KathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond repute
Send a message via AIM to KathieK
Re: Print a different page than current page?

I figured out how to do it.

In the current document, in the HEAD tag, type the following code (where href= refers to the different page you want to print without loading to the screen first):

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

<script>
function printWindow(){
bV = parseInt(navigator.appVersion)
if (bV >= 4) window.print()
}
</script>


and then in the BODY of the current document type:

<a href="javascriptrintWindow()">Print The Different Page</a>

(I wanted a link to print and not a print button).

I know this won't work for every browser, but it will work for my purposes. Thanks to everyone who replied with suggestions!
__________________
Check out my 2016 Conference presentation, Dumpster Diving: How to Get Stuff for Your Team for Free or at Little Cost
www.usfirst.org | www.nefirst.org | www.firstnemo.org
Helping mentors since 2004