Re: Hide the Menu while Printing from a Print Button on the same Page

Andrew Roazen <[email protected]> Fri, 29 Aug 2003 11:22:22 -0700
Newsgroups gmane.comp.web.milonic
Message-ID <[email protected]>
--===============5662333519614613==
Content-type: multipart/alternative;
 boundary="Boundary_(ID_QFXKzVsrtoVabVwZCuJy5w)"


--Boundary_(ID_QFXKzVsrtoVabVwZCuJy5w)
Content-type: text/plain; charset=us-ascii; format=flowed

At 12:00 PM 8/11/2003 +0200, Hardowin wrote:
>
>  Hi All,
>
>I'm Trying to Print a Page but i don't want the Menu to be Printed.
>
>On the Page i made a Print Button, is it possible to automatically Hide 
>the Menu as soon as somoene Hits the Print Button.
>After printing it should be visible.
>
>I found the following code in the Archives:
>
>[snip]
>
>But this makes the Menu totally invissible.
>
>Could someone help me?
>Should the script be in the Array files or just on the Page??
>
>
>Hardowin

Forget JavaScript. Create a hidemenus.css document with the following in it:
#menu0 {display:none;}

Then add the following inside your document(s) <HEAD> section:
<link href="hidemenus.css" rel="stylesheet" media="print" type="text/css" />

No JavaScripting, no problems.

For those of you who use the <STYLE> tag to import stylesheets, resist the 
impulse to do so here. We *want* NN4 to respect this print stylesheet. 
Otherwise, NN4 will attempt to render the menus on the printed page and due 
to bugs in NN4, the entire printed page ends up blank.

This method needs to be featured somewhere on the Milonic website.


----------
| Andrew Roazen, Web Development Specialist
| Cline Library, Northern Arizona University
|  928.523.6764 <http://www2.nau.edu/~ar24/aroazen.vcf>vCard

The opinions expressed are those of the guy who sits at this desk, not his 
employers.

--Boundary_(ID_QFXKzVsrtoVabVwZCuJy5w)
Content-type: text/html; charset=us-ascii

<html>
<font size=3>At 12:00 PM 8/11/2003 +0200, Hardowin wrote:<br>
<blockquote type=cite class=cite cite>&nbsp;<br>
&nbsp;Hi All,<br>
&nbsp;<br>
I'm Trying to Print a Page but i don't want the Menu to be Printed.<br>
&nbsp;<br>
On the Page i made a Print Button, is it possible to automatically Hide
the Menu as soon as somoene Hits the Print Button.<br>
After printing it should be visible.<br>
&nbsp;<br>
I found the following code in the Archives:<br>
&nbsp;<br>
[snip]<br>
&nbsp;<br>
But this makes the Menu totally invissible.<br>
&nbsp;<br>
Could someone help me?<br>
Should the script be in the Array files or just on the Page??<br>
&nbsp;<br>
&nbsp;<br>
Hardowin</blockquote><br>
Forget JavaScript. Create a </font><tt>hidemenus.css</tt><font size=3>
document with the following in it:<br>
</font><tt>#menu0 {display:none;}<br><br>
</tt><font size=3>Then add the following inside your document(s)
</font><tt>&lt;HEAD&gt;</tt><font size=3> section:<br>
</font><tt>&lt;link href=&quot;hidemenus.css&quot;
rel=&quot;stylesheet&quot; media=&quot;print&quot;
type=&quot;text/css&quot; /&gt;<br><br>
</tt><font size=3>No JavaScripting, no problems. <br><br>
For those of you who use the </font><tt>&lt;STYLE&gt;</tt><font size=3>
tag to import stylesheets, resist the impulse to do so here. We *want*
NN4 to respect this print stylesheet. Otherwise, NN4 will attempt to
render the menus on the printed page and due to bugs in NN4, the entire
printed page ends up blank.<br><br>
This method needs to be featured somewhere on the Milonic website.<br>
</font><br>

<hr style="display:none;">
<div style="margin-top: 12px; font-family: 'N Helvetica Narrow', 'Arial Narrow'; font-size: .8em; background-color: #eee; padding: 3px; border-left-width: 3px; border-left-style: solid; border-left-color: #ccc;">
<span style="display:none;">| </span>Andrew Roazen, Web Development
Specialist <br style="display:none;">
| Cline Library, Northern Arizona University <br style="display:none;">
| <span style="font-size: .9em;">&#9742;</span> 928.523.6764
<a href="http://www2.nau.edu/~ar24/aroazen.vcf">vCard</a><br><br>
The opinions expressed are those of the guy who sits at this desk, not
his employers.</div>
</html>

--Boundary_(ID_QFXKzVsrtoVabVwZCuJy5w)--

--===============5662333519614613==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

_______________________________________________
Milonic mailing list
[email protected]
http://www.milonic.com/mailman/listinfo/milonic

--===============5662333519614613==--