Loading... Please wait.
 Livio.net Home Page
  Users online:   1  
Home Web Design Sitemap Contact
 Go to Home Page  Printer Friendly version of this page  Bookmark this page
     
Web  Livio.net
  
Monday, April 29, 2024   ««   
ASP Scripts
ASP Functions Library
ASP Online Tools
ASP Links Reference
 Cool Links

 Cool Links

 Cool Links

 Cool Links
Weather Forecast
Paragliding fly sites
Live Web Cams
Image Gallery
Online Road Maps
Online Translations
Currency Conversion
IP Geolocation Tool
Online Feed Reader
Freeware Software
Friend sites


Join the Mailing List
Mailing List: privacy policy


   Asp Scripts
   PrinterFriendly     

Author: Livio Siri
Size: 3 kb
Downloads: 5113
Revision: 2.0
Date: 29/01/2006
Category: Code Snippets
   View Demo    DEMO

 View Info    INFO

 View License Agreement    LICENSE

 Download   DOWNLOAD
 

Back to the category: Code Snippets
Back to scripts home page
Description:
This code snippet shows how to implement a "printer friendly" version link for your pages.

The "Printer Friendly" version select the main content of your page, removing the menu, header graphics, advertising and foot content. The script performs the HTTP "get" method via the XMLHTTP object to retrieve the page to be printed. Using the XMLHTTP object instead of something like FSO means that the ASP page is actually executed and not just 'read' as a stream of characters.

ASSUMES THAT YOUR PAGE HAS PRINTABLE CONTENT WITHIN TWO COMMENTS:
<!-- content_starts_here //-->
............
<!-- content_ends_here //-->

You can find a live example in this page, follow the printer link.
The code is commented in the script.
(Needs MSXML 3.0 and VBScript version 5 or above installed on Server)

REVISION HISTORY:

V 2.0:
Problem with special characters ä, ö, å, æ, ø etc. now fixed
 

Rated:
by Aspin.com users
What do you think?
 
Rate this script
@ HotScripts.com

CATEGORIES:


Applications   (5)   (ASP Applications Collection)
  ImageThumbs
This application let you show a nice thumbnail images presentation on your web pages, with autoresize.

  WEB Calendar
Database driven daily, weekly and montly event web or intranet calendar with event add, edit and delete.

  dbList
 Planet Source Code Superior Coding Contest Winner Database management grid with record edit, delete, add, search, filter and export to excel, database and table dropdown selection, pages navigation, field sort and search in page.

  Active Users
Show active users and who is online on your web pages without global.asa.

  Security Login
Protect your ASP pages with password access.



Code Snippets   (1)   (ASP Code Snippets Collection)
  PrinterFriendly
This code snippet shows how to implement a "printer friendly" version link for your pages.



Functions   (3)   (ASP Functions Collection)
  getFileName
Given a file path either physical or virtual with this function you can obtain the file name or the file dir

  okEmail
ASP function to check proper email input

  PageNav
Function to easily navigate through pages.

 

Top 10 Downloads:
  WEB Calendar  (34091)
  ImageThumbs  (22795)
  dbList  (22590)
  PrinterFriendly  (5113)
  PageNav  (5012)
  Security Login  (3521)
  Active Users  (3273)
  okEmail  (1177)
  getFileName  (936)

Total downloads: 98508

Total Resources:
9 downloads available.

Script Search:


Make a donation:
If you find the code useful, then please help supporting the development and update of these and future scripts by a small donation:



Powered by:
 Livio.net


      ASP Functions Library
          Reference Library listing 164 useful ASP Functions in 13 categories


      ASP Tools
         Useful ASP Tools




 

  ««   
Page rendered in: 371 ms  
Copyright © Livio.net MM-MMXXIV. All rights reserved.

 Get Firefox!
   This Page Is Valid XHTML 1.0 Transitional!
   This page is CSS validated
   livio.net page rank
   Help beat spam!
  HAM Radio  I K 1 H S L
    Site Stats
 
Privacy Cookies Policy License Terms of Use Report Errors Link to Livio.net