Reply
How to print a frame that has scroll bars
Old 10-18-2005, 08:33 AM How to print a frame that has scroll bars
tcb
Experienced Talker

Posts: 34
Does anyone know how to print a frame that has horizontal scroll bars?

I am using "parent.bottomFrame.focus();print()", because the Print button is in another frame, but it prints only a little part of the frame.

tcb.
tcb is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 10-18-2005, 10:06 AM
funkdaddu's Avatar
Web Design Snob

Posts: 636
Quote:
Originally Posted by funkdaddu
try:
onClick="parent.bottomFrame.print();"
and make sure the content isn't too wide to be printed on one page.
.
Quote:
Originally Posted by tcb
Thanks, but that doesn't work. I am gonna try the other forum..

tcb.
I tested it on IE6, Firefox and Safari and that code worked for me:
http://www.siriusad.com/test/frame.html

What isn't working? Do you get an error? Can we see the code/link to the page?
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 10-18-2005, 10:41 AM
tcb
Experienced Talker

Posts: 34
The "Print" button is in one frame(topFrame) and I want to print the other frame (bottomFrame). That's why it has to be something like I have done before:

onClick="parent.bottomFrame.focus();print()"

The topFrame contains a form with many boxes and some buttons (Search, Print and Reset). The input for the "Print" button is:

<input type="button" name="Print" value="Print" onClick="parent.bottomFrame.focus();print()">

As you said, I think the frame (bottomFrame) is too big to be printed in one page. But I would like to know how do I do to print the whole frame. It doesn't matter if it's gonna be in one or more pages.

Thanks,
tcb.
tcb is offline
Reply With Quote
View Public Profile
 
Old 10-18-2005, 10:56 AM
funkdaddu's Avatar
Web Design Snob

Posts: 636
Well, you don't need the focus(), then the print(), you can just target the frame and use print() like in my example. I tried with the focus and on some browsers it printed the wrong frame when added to a button.

How wide, in pixels, is the bottom frame? If it's bigger than 550px or so it can run off the printed page on some browsers. Can I see the actual page you're working on? Can you post it somewhere to see?

Another thing is to tweak your CSS for printing, adding some print-specific style sheets for that frame may help, but once again, I can't tell without seeing the page you're talking about.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to How to print a frame that has scroll bars
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12111 seconds with 12 queries