[WEB4LIB] Print Page & E-Mail This Page (functions)...

glen.davies at cce.ac.nz glen.davies at cce.ac.nz
Sun Sep 24 20:54:55 EDT 2000


Hi
I have done this with a few of our guides that we have available on 
our website, reformatting for printing that is, not emailing yet.

It uses server side includes and asp. If there is no query string in 
the url then one header and footer are included, but if 'print' appears 
in the query string then a different header and footer are included.

eg.

<%
qs=request.servervariables("query_string")
%> 
<% if qs="print" Then %> 
<!--#include virtual="/help/guides/printheader.asp"-->
<% Else %> 
<!--#include virtual="/help/guides/normalheader.asp"-->
<% End If %>

I have done similar things on apache with XSSI.
<!--#if expr="$QUERY_STRING" -->
<!--#else -->
<!--#include virtual="../defaultheader.html" -->
<!--#endif -->

> 
> I'm looking to add two types of functionality to a Web site... and would be
> interested if anyone here knows of a good Javascript or CGI solution for
> these:
> 
> 	* Print This Page (formats for printer-friendly/or just print)
> 	* E-Mail This Page (form type, fill in e-mail address, populates with URL,
> etc.)
> 
> I'll be glad to summarize for the list any replies, and was just thinking of
> not re-inventing the wheel and/or coding, if there's some public domain code
> that can handle these functions.
> 
> Is anyone using anything like these on library sites/pages? I see them a lot
> on newspaper sites, content sites like newsletters, etc., and find them
> useful and handy tools. I often e-mail myself Web pages, to view later, etc.
> 
> Any tips appreciated.
> 
> Best regards,
> Michael McCulley
> mcculley at best.com
> 
> Quote of the Moment:
> When it rains, why don't sheep shrink?
> 




More information about the Web4lib mailing list