473,320 Members | 1,820 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,320 software developers and data experts.

printing the webpage

There is a HTML page which composes several frames. Each frame displays
a different HTML page.

When "windows.print()" is invoked in a particular HTML frame page, a
print dialog pop-ups but it can print the contents in that particular
HTML frame page only. This is different from by selecting "File->Print
...." from Internet Explorer.

May I know how to pop-up a print dialog invoked by JavaScript in a
particular frame which can print all contents of the whole HTML page
(including the contents of the frames) but not only the contents of
that particular frame?

Thank you.

Jul 23 '05 #1
11 1242
Hi!

Have you tried this inside the javascript that invokes the print?

// Give focus to parent frame
MyParentFrame.focus()
// Print parent frame. That should print everything
MyParentFrame.print()

You may can store the name of the frame that invoked the print in a
variable and then return the focus to that frame after the onafterprint
event in case you need to have focus back on that frame.

HTH, M

Jul 23 '05 #2
Hi!

Have you tried this inside the javascript that invokes the print?

// Give focus to parent frame
MyParentFrame.focus()
// Print parent frame. That should print everything
MyParentFrame.print()

You may can store the name of the frame that invoked the print in a
variable and then return the focus to that frame after the onafterprint
event in case you need to have focus back on that frame.

HTH, M

Jul 23 '05 #3
Hi!

Have you tried this inside the javascript that invokes the print?

// Give focus to parent frame
MyParentFrame.focus()
// Print parent frame. That should print everything
MyParentFrame.print()

You may can store the name of the frame that invoked the print in a
variable and then return the focus to that frame after the onafterprint
event in case you need to have focus back on that frame.

HTH, M

Jul 23 '05 #4
Hi!

Have you tried this inside the javascript that invokes the print?

// Give focus to parent frame
MyParentFrame.focus()
// Print parent frame. That should print everything
MyParentFrame.print()

You may can store the name of the frame that invoked the print in a
variable and then return the focus to that frame after the onafterprint
event in case you need to have focus back on that frame.

HTH, M

Jul 23 '05 #5
th************@hotmail.com wrote:
Hi!

Have you tried this inside the javascript that invokes the print?
You can try it but it won't be very dependable.
// Give focus to parent frame
MyParentFrame.focus()
MyParentFrame is undefined.
// Print parent frame. That should print everything
MyParentFrame.print()
MyParentFrame is undefined.
You may can store the name of the frame that invoked the print in a
variable and then return the focus to that frame after the onafterprint
event in case you need to have focus back on that frame.
My browser has no onafterprint event. But, you don't need to wait, you
can set focus back to your window.
HTH, M


It didn't, it only confused the issue. In the future, before you post
the same thing 4 times without quoting what you are replying to, please
read this groups FAQ, its linked to in my signature.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #6
Before you have a go at me speak to Google. It's a refresh problem that
caused a blank reply to repost before I noticed. And get a proper
browser that supports the onafterprintevent too.

Jul 23 '05 #7
th************@hotmail.com wrote:
Before you have a go at me speak to Google. It's a refresh problem that
caused a blank reply to repost before I noticed. And get a proper
browser that supports the onafterprintevent too.


I would explain that to you but you are obviously either too anal or too
stupid to understand the answer.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Jul 23 '05 #8
What?

Jul 23 '05 #9
th************@hotmail.com wrote:
What?


What What?
WTF are you talking about?

Read this groups FAQ. Very thoroughly.

Maybe after that you won't need to ask "What?" in reply to being called
anal, it will come to you.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #10

I reported you to abuse for your inappropiate language.

Jul 23 '05 #11
th************@hotmail.com wrote:
I reported you to abuse for your inappropiate language.


Are you actually as stupid as you act? Don't answer that. It might cause
you to have brain farts trying to figure it out.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: gb | last post by:
Hi All, Ive created a popup page using 'var openWindow = window.open("new","pop")' And added content using openWindow.document.write(" "); statements. But now I would like to be able to print...
4
by: venkat | last post by:
Hi all, I need print a webpage from internet explorer. The page may contain images, links, stylesheets etc. how will i send all these things to server side for printing. I am using asp.net with...
0
by: Krzysztof Malinowski | last post by:
Hi, I made a webpage (using C#), once hosted it on WebMatrix server on WinXP. When I printed the page was the same like in browser. Twice I put the same webpage on WebMatrix on Win2K, when I...
2
by: edx | last post by:
Hi, this question has probably been ask a hundred times before, but searching through this newsgroup I have not found any solution to my problem: I want to make my asp.net website print on the...
17
by: Alan Z. Scharf | last post by:
How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web application? Thanks. Alan
2
by: ACaunter | last post by:
Hi all, i was wondering if there was a way to directly print a document to the user's printer, without having to download it first... I needed something like a button, and when the user clicks the...
3
by: carlor | last post by:
Hi there, Our client has a requirement to print labels from the web site to a local printer. i.e. user logs onto web site and click a print button and the address is printed to a label printer...
1
by: uto | last post by:
i'd like to know about printing of webpage ListView tablele this listview is like resume table forms so i have to print as this page of table type. may be listview count is about 50. how can i...
4
by: Brooke | last post by:
Is there a way to prevent a user from printing a webpage?
0
by: ESmith | last post by:
I need to create a website that receives documents from multiple users. When an manager comes in, he needs / wants to be able to select one, several, add of the documents, and have them formatted...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.