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

hiding a frame when printing


Hey all,

First off, frames - eww. I know. It's an internal site, so please don't tell
me to ditch the frames. We like them for what they're being used for.

That said, my users like to print just one frame, but it's a little bit
irritating to have to remember to choose "print only selected frame" in the
print dialog boxes. I've been messing with CSS media to try to not print the
menu frame. It's not going as well as I'd hoped. Can anyone help?

Here's what I have:
In the left frame, which should not print:
@media print {
body {
display: none;
}
}

In the frameset:
@media print {
#leftFrame {
display: none;
}
}

Problem: In IE, there is still a large left-side blank where the frame
content would be if it were shown. I want it collapsed so there is only the
typical page margin.
In Firefox/Netscape/Mozilla, there is the the large blank, plus it is
surrounded by a black outline.
What gives? Why can't I just tell it not to print the frame?

(I also tried setting the widths of the body, the frame, etc, to 0; no
good...)

--
--
~kaeli~
Cthulhu saves our souls and redeems them for valuable
coupons later.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 21 '05 #1
4 6566
"kaeli" <ti******@NOSPAM.comcast.net> a écrit dans le message de
news:MP************************@nntp.lucent.com
First off, frames - eww. I know. It's an internal site, so please
don't tell me to ditch the frames. We like them for what they're
being used for.

That said, my users like to print just one frame, but it's a little
bit irritating to have to remember to choose "print only selected
frame" in the print dialog boxes.


Add a "print this page" button, that opens a new window without any frame.
Then the user can print this one.

Jul 21 '05 #2
In article <41***********************@news.free.fr>, pg******@nowhere.invalid
enlightened us with...
"kaeli" <ti******@NOSPAM.comcast.net> a écrit dans le message de
news:MP************************@nntp.lucent.com
First off, frames - eww. I know. It's an internal site, so please
don't tell me to ditch the frames. We like them for what they're
being used for.

That said, my users like to print just one frame, but it's a little
bit irritating to have to remember to choose "print only selected
frame" in the print dialog boxes.


Add a "print this page" button, that opens a new window without any frame..
Then the user can print this one.



This is a last resort solution unless you know of a way to get the page
without asking for it again from the server. The pages they like to print are
often the results of large queries and reports, so it would hurt my server a
bit to have to ask for the page twice.
Also, it requires a popup window (new window), so it's one more window they
have to then close. Not the optimal solution.

Thanks, though.

I have come close to a solution here, actually, but when I do
document.framename.print, it brings up the printer dialog box instead of the
print preview box, so when it gets printed, it cuts off parts of the page if
the page is too wide. They normally choose print preview then configure it to
print so it fits on one page.

I have a feeling there is no nice, tidy solution for this.

--
--
~kaeli~
He's your God, they're your rules - you burn in Hell.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 21 '05 #3
kaeli wrote:
pg******@nowhere.invalid wrote:
> That said, my users like to print just one frame, but it's a little
> bit irritating to have to remember to choose "print only selected
> frame" in the print dialog boxes.

Add a "print this page" button, that opens a new window without any
frame.
Then the user can print this one.

This is a last resort solution


Indeed, but by imposing frames you are forcing last resorts.
Jul 21 '05 #4
"kaeli" <ti******@NOSPAM.comcast.net> a écrit dans le message de
news:MP************************@nntp.lucent.com
Add a "print this page" button, that opens a new window without any
frame. Then the user can print this one.
This is a last resort solution unless you know of a way to get the
page without asking for it again from the server.


Just send the correct cache http headers with the page, and it should be OK.
You can read the RFC 2616 chapter 13 for more information.

Jul 21 '05 #5

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

Similar topics

8
by: Fabian | last post by:
Is there a way to hiode the horizontal (but NOT the vertical) scrollbar? -- -- Fabian Visit my website often and for long periods! http://www.lajzar.co.uk
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....
8
by: Rob McLennan - ZETLAND | last post by:
Hi, I have set up an external stylesheet, named "print.css", to format the style of all pages printed from my company's website. I've been previewing my changes to the stylesheet by doing...
1
by: Richard Brand | last post by:
We run into a strange problem with a client when printing a frame from a website. On the site there is a button that performs the following javascript code: parent.myFrame.focus();...
1
by: Bogdan Zamfir | last post by:
Hi, I have a web page with two frames. Left one has a aspk page with application menu, and right one has the astive working form Depending on some conditions in right page, I want to be able...
6
by: J Ames | last post by:
I have an ASP.NET (VB) form that has two drop downs, a horizontal rule and a button. The button invokes a stored procedure and several tables are created on the page with data populated. I want...
2
by: PieOPah | last post by:
I have a webpage that uses frames (yes I know, frames - previously been flamed about that, but I do not know anything else to use since I am clueless!!! Been asked to cobble together a site since...
4
by: Rico | last post by:
Hello, I have an MDE application where I use a bound object frame to display an image. This frame is updatable and bested on the contents of an OLE field. My problem is, some images display as...
9
by: Stan Brown | last post by:
I've searched Google and the group archives, and came up empty, but maybe I just haven't selected the right search term. This concerns only the screen -- printing isn't an issue. I'm also not...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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.