printing the webpage

E

Eric

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.
 
T

theintrepidfox

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
 
T

theintrepidfox

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
 
T

theintrepidfox

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
 
T

theintrepidfox

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
 
R

Randy Webb

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.

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.
 
T

theintrepidfox

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.
 
R

Randy Webb

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

Randy Webb


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.
 
R

Randy Webb

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.
 

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,774
Messages
2,569,596
Members
45,142
Latest member
DewittMill
Top