Re: Printer friendly pages

"Paul Lesniewski" <[email protected]>
Newsgroups gmane.mail.squirrelmail.devel
Message-ID <[email protected]>
On Fri, May 9, 2008 at 7:57 AM, Thijs Kinkhorst <[email protected]> wrote:
> On Fri, May 9, 2008 16:41, Paul Lesniewski wrote:
>> My css is rusty ATM, but I was pretty sure you could specify any css
>> attributes you want to differently for each media type.  So in the left
>> frame's style sheet (might need to split one off for it), set display:none
>> for the print media type (sorry, reverse logic in my previous post above).
>
> Yes, but with such a technique I can make the frame empty, but not
> disappear. So if you print webmail.php, your printout will have a chunk of
> white space on the left hand side.
>
> If there were some way to set the entire frame to display none or to width
> 0 I'm interested but I couldn't find a working one.

Do you use the advanced skin?  Notice the up and down buttons in the
upper right-hand corner.  They push the preview pane away (by setting
frame widths).  You can steal that code.  Catch is that again it
requires JavaScript, but the concept is easy (note that the width
setting part should be abstracted):

<script type="text/javascript">
<!--

   orig_left_size = ..... can't be bothered to figure this out, but
it's easy enough....

   if (document.all)
   {
      parent.document.all["fs1"].cols = "0, *";
   }
   else if (this.document.getElementById)
   {
      parent.document.getElementById("fs1").cols = "0, *";
   }

   PRINT!!!

   if (document.all)
   {
      parent.document.all["fs1"].cols = orig_left_size + ", *";
   }
   else if (this.document.getElementById)
   {
      parent.document.getElementById("fs1").cols = orig_left_size + ", *";
   }

//-->
</script>

Thing is, would the javascript block at the PRINT part until the
content is sent to the printer before it sets the left frame back up
to size?

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.