473,387 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Any special considerations for making printable version of page?

I'm going to use an aspx page to display an invoice that customers can print
from. Sometimes when I go to a site and navigate to a page I want to print,
they will have a button that says something like "Show Printable Version".
Other than taking out all of the gui stuff and making a simple clean page
for printing, is there any other design considerations for making a page
good for printing? I'm using frames and all of my content shows in the main
frame. Is it possible to have the invoice aspx page show in the main frame
and then just print that page and not the header and left menu frame?

Thanks.

--
mo*******@nospam.com
Nov 18 '05 #1
1 1837
Hi Moondaddy,

From your description, you want to implement the printable page function
which can help print a specify "printable" page. Also, your web application
is frame based, so your problem is mainly focus on how to specify a certain
frame to be printed, yes?

As for this problem, I think you can use the following means:
1. When in frame based page, we can use window.parent.frames("framename")
to reference a certain frame we want. Then if we want a specified frame to
be printed when we call "window.print()", we can use the "focus()" function
of a window. For example, we have a three frames structure page.
-----------------------------------------------
top
-----------------------------------------------
left | right
|
|
---------------------------------------------------

if we want to print the right frame when a button in left frame(in fact
this applies no matter in which frame the function id called) is clicked:

<script language="javascript">
function printFrame(frm)
{
window.parent.frames(frm).focus();
window.print();
}
</script>

<input type="button" onclick="printFrame('right')" />

#Notice that the key point is call the .focus() method which set the
active frame(which will be printed when window.print() is called no matter
in which frame).

2. Also, I think you can also use the window.open( url of the printable
page) or a hyperlink such as
<a href="url of the printable page" target="_blank" />
to open a new browser window which will contain the printable page. Do you
think so?
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Pikkel | last post by:
i'm looking for a way to replace special characters with characters without accents, cedilles, etc.
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
17
by: CJM | last post by:
....When I say 'form' I'm talking about a conventional paper version, as opposed to a <form>. I'm building a web-based application which needs to be able to create Invoices/Advice Notes/Order...
2
by: Harold R | last post by:
Is there HTML code available to provide a printable version of a web page? Without the browser graphics, that is. -- Regards, Harold A Ralston Racine, Wisconsin, USA
7
by: Sens Fan Happy In OH | last post by:
I'm having majour issues with FrontPage 2K and a webpage that I am having to create from scratch based on someone else's prior work. I hope someone can look at the source code for the page in...
10
by: CJM | last post by:
....When I say 'form' I'm talking about a conventional paper version, as opposed to a <form>. I'm building a web-based application which needs to be able to create Invoices/Advice Notes/Order...
5
by: moondaddy | last post by:
I'm going to use an aspx page to display an invoice that customers can print from. Sometimes when I go to a site and navigate to a page I want to print, they will have a button that says something...
8
by: abhi147 | last post by:
Hi , I have been trying to convert a 32 bit string like "b2a4fdf15af7c4f215e1909be4707bdb" to convert to a string of special chars like "²¤ýñZ÷Äòá?›äp{Û" I have tried a lot of things .. but...
4
by: wheel | last post by:
I have already built in support for multiple languages in some of my applications, but so far they have only used Western languages (English, Spanish, etc). I need to add some Far East languages:...
3
by: Arancaytar | last post by:
This is my site: http://arancaytar.ermarian.net/ I am using this stylesheet to generate a printable version of the page (using media="print"): ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.