Forums

This topic is locked

printer friendly pages

Posted 03 Jan 2004 01:26:46
1
has voted
03 Jan 2004 01:26:46 Gil Acosta posted:
Looking for a way to have a printer friendly page function on all pages without having to duplicate pages.
any help would be greatly appreciated.

gil

Replies

Replied 03 Jan 2004 15:23:44
03 Jan 2004 15:23:44 Vince Baker replied:
Hi Gil,

When initially designing your site if you build you pages with include files (containing all the content that you would not want on the printed version) then add a simple piece of code to check that the page to be displayed is printable or not you could then remove all the includes from a page and have a printable version. I have done this before on a couple of intranet sites...

For example, if you use the following code:

<% If not Request.Querystring("Printable" = "Yes" then %>

<!--#include virtual="/_inc/generic/_inc_config.asp" -->

<% end if %>

Then, add a link on the page for the printable version:

<a href="<%=Request.ServerVariables("SCRIPT_NAME"%>?Printable=Yes" target="_blank">Printable
Version </a>

This will show the includes unless the user clicks on the printable version link. Then the current page will be reloaded without the includes....

Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting

Reply to this topic