
|
|
|
PrinterFriendly
| |
|
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
|
| |
| Simpleforum: Functions Generic Forum (Total 27 Messages) |
|
| | » Post New Message | View Mode : |
![]()  | | I found your Print.asp script great, but I have one problem. All the fonts are a ... (more)
|
|  | | Hi When I use print.asp on a site closed for Anonymous Acces i get an error ... (more)
|
|  | | I seem to have a problem with the first test page I tried to keep reappearing no ... (more)
|
|  | | button | Palmeet | '06 Mar 27, 12:47 |
| hello sir, I have used this code in my own page.But when i click on button ... (more)
|
|  | | If you have correctly included the special comments in your page, check that you ... (more)
|
|  | | Hello sir, I am using this code snippet to generate the printer friendly pa ... (more)
|
|  | | When you call for the printer friendly page a new instance of the page is execut ... (more)
|
|  | | Hello sir, Thanks for replying Sir as you have said that it is difficu ... (more)
|
|  | | Hello sir,
I have tried the code but it is not removing the menu's,he ... (more)
|
|  | | The script takes everything between the special comments, including the content ... (more)
|
|  | | sir Thanks for replying. You have said that the contents which i want ... (more)
|
|  | | Special comments you should include into your page are:
....... ... (more)
|
|  | | Hello Sir Thanks for replying with sample code. I tried the same code ... (more)
|
|  | | Verify your system for these requirements: MSXML 3.0 and VBScript version 5 ... (more)
|
|  | | Hello sir, I tried all you said, and am now able to get the printer friendl ... (more)
|
|
|
|
|
|
| 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
|
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.
|
|
|
 |
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.
|
|
|
| |
| Total Resources: |
| 9 downloads available. |
|
|
|
|
|
| 
|
|