473,407 Members | 2,315 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,407 software developers and data experts.

trying to print a page in a different frame

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
2 1836
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Marcus Bjorke | last post by:
I use a print link that causes a problem with Opera 7. The link looks like this <a href="javascript:parent.frames.mainFrame.print()">Print this page</a> I also used <a...
4
by: Scott Navarre | last post by:
Hello, I have 2 frames. The top one is the control frame and the bottom one is the display. I have a roll-over button in the top frame that I want to use to do a print() for the bottom frame....
3
by: Jofio | last post by:
In my frame based page, I have a hyperlink in the top frame called "header" which, when I click, should make two different pages to be loaded and displayed into two different frames, namely...
2
by: Jay | last post by:
I have an application that uses the DataGrid to list several employees. You click on a button associated with an employee to display a report on one employee in a popup window. From that report you...
2
by: Balamurali C | last post by:
Hi All I'm having one problem, since im debuging this last one week I'm not able to do. Problem: In my webage I have two Frames(top & bottom) in the top frame I'm displaying some...
11
by: Rob | last post by:
I know, I know, don't use frames. Well, I'm stuck with these frames and I'm trying to add functionality without a complete redsign. You can look at this as a nostalgic journey. Anyway, I've got...
8
by: makunag | last post by:
Didn't get answer with google and in my regular forum. Came across this site and posting here. Your help will be highly appreciated ! Our application have frames - MainNav, TaskNave and Content....
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.