trying to print a page in a different frame

D

David Cho

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?
 
D

DJ WIce

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

: 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?
:
:
 
D

David

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top