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