Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 21st, 2004, 02:28 AM
Registered User
 
Join Date: Dec 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how can i take print out of desired area

hi
I am preparing a school managment application and in some pages i need to take some print out of pages by pressing a button only. how can i do that

thanks


 
Old December 21st, 2004, 08:16 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

This should be what you were looking for.

Print a page using an image and JavaScript

Or try this.
Code:
<input type="Button" name="printit" value="print" onclick="javascript:window.print();">
Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old December 22nd, 2004, 12:01 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,

  If you want to print only a specific part on any page, follow some stylesheet rules.

Ex: <table class='printtab'><tr><th>...</th></tr></table>
<table class='noprinttab'><tr><th>...</th></tr></table>

<style>
@media screen{
    table.printtab {visibility:visible;color:#000080;background-color:#eeeee3;font-size:16 px;}
    table.noprinttab {visibility:visible;color:#000080;background-color:#eeeee3;font-size:16 px;}

}
@media print{
    table.printtab {visibility:visible;color:#000000;background-color:#ffffff;font-size:13 px;}
    table.noprinttab {visibility:hidden;}
}
</style>


Only the first table is printed with different font-size and colors.


-----------
Rajani






Similar Threads
Thread Thread Starter Forum Replies Last Post
Query does not produce desired result snufse SQL Server 2005 0 July 2nd, 2008 12:14 PM
Using xs:time to generate time in desired format krayan001 XSLT 0 June 27th, 2005 04:28 PM
print the hidden page without the print dialog box kayzem Classic ASP Basics 0 April 21st, 2005 11:31 PM
Print and print preview file on the website withou appleLover General .NET 0 February 19th, 2005 02:24 AM
XML won't transform as desired albruan XSLT 3 April 14th, 2004 04:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.