By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

trying to print a page in a different frame

P: n/a
My button to print a document is in one frame, but the target doc is in a
different one.

The button
=======
<input type="submit" name="btnPrint" value="Print Application" id="btnPrint"
class="Buttons" onClick="javascript:top.main.window.print();return false;"
/>

The frame page
===========
<frame name="header" src="submit_page.aspx" scrolling="no" noresize>
<frame name="main" src="application_xslt.aspx">

It does print, but not the page I want. It keeps printing the page where
the button is located. Thanks for your help in advance. I am trying to
print the "main" frame. Does it have anything to do with the fact that it
is an ASP.NET page?
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
in the main pages:
function PrintMain()
{
if (document.all)
document.body.focus(); //MSIE needs focus the the right frame first
window.print();
}
then call that from the other frame.
Wouter

"David Cho" <sp************@spammersgohome.com> wrote in message
news:5R*****************@twister.socal.rr.com...
: My button to print a document is in one frame, but the target doc is in a
: different one.
:
: The button
: =======
: <input type="submit" name="btnPrint" value="Print Application"
id="btnPrint"
: class="Buttons" onClick="javascript:top.main.window.print();return false;"
: />
:
: The frame page
: ===========
: <frame name="header" src="submit_page.aspx" scrolling="no" noresize>
: <frame name="main" src="application_xslt.aspx">
:
: It does print, but not the page I want. It keeps printing the page where
: the button is located. Thanks for your help in advance. I am trying to
: print the "main" frame. Does it have anything to do with the fact that it
: is an ASP.NET page?
:
:
Jul 20 '05 #2

P: n/a

function PrintMain()
{
if (document.all)
document.body.focus(); //MSIE needs focus the the right frame first
window.print();
}
then call that from the other frame.
Wouter


Thank you for your response, but exactly how do I do that? (I am a
javascript novice). Again, the frame where the button is called "header"
and the page I am trying to print is "main"
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.