473,563 Members | 2,635 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="javasc ript:top.main.w indow.print();r eturn false;"
/>

The frame page
===========
<frame name="header" src="submit_pag e.aspx" scrolling="no" noresize>
<frame name="main" src="applicatio n_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 1856
in the main pages:
function PrintMain()
{
if (document.all)
document.body.f ocus(); //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******** *********@twist er.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="javasc ript:top.main.w indow.print();r eturn false;"
: />
:
: The frame page
: ===========
: <frame name="header" src="submit_pag e.aspx" scrolling="no" noresize>
: <frame name="main" src="applicatio n_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.f ocus(); //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
9419
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 href="javascript:print()">Print this page</a> and it also worked with most browsers. I realize that it only works if you have Microsoft Windows versions for PC but that is...
4
6235
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. I tried having this JavaScript code when the roll-over button is clicked: parent.frames.focus();parent.frames.print() I am using Internet...
3
1558
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 "thumbnails" frame and "main" frame simultaneously. My framed page is defined as follows: <frameset rows="15%,*,15%"> <frame src="headerWelcome.html"...
2
1447
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 can print it. The report is semi-generated -- basically filling in some fields from a database. The report is fairly complicated, involving several...
2
2062
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 images(logo...etc) and bottom frame I'm displaying some document(excel,word,ppt,pdf etc...)which are working fine. when I take print, using IE-File-menu...
11
16908
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 the following frame structure at the top level: FRAMESET CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">...
8
4055
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. When print button is clicked, it prints only the Content (obviously top.Content.focus() is in the code before window.print()). We were using windows...
0
7580
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7634
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2079
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.