Click to See Complete Forum and Search --> : Print Style Sheet Will Not Suppress JavaScript Menu


Tom Servo
06-04-2003, 02:02 PM
I use a print style sheet so only the desired text of a page will print.
The only problem I have encountered is the inability to prevent the top layer of a JavaScript-generated cascading menu from printing. I have tried various schemes but cannot keep the top layer from printing.
Fortunately, I only have to deal with IE 5 and 6. I am on an Intranet and cannot post a URL. Below is the html and the css I am using.
The menu displays in #MenuPos. Menubox fixes the location of #MenuPos. None of the other items in the banner div print. Other divs containing menus and links elsewhere on the page do not print. It is only the #MenuPos that causes problems.

************FROM HTML FILE**********
<head>
<title>Region 7 Public Information Services</title>
<link rel="stylesheet" href="../content.css" type="text/css"
media="screen">
<link rel="stylesheet" href="../contentprint.css" type="text/css"
media="print">
<script type='text/javascript' src='../admin_static_menu.js'></script>
<!--This script produces the cascading menu at the top of the page.The menu displays in the MenuPos div below-->
<script type='text/javascript'>
//HV Menu v5- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more
> >
function Go(){return}
> >
</script>
<script type='text/javascript'
> src='../menu_horiz_var_3_column.js'></script>
<script type='text/javascript' src='../menu_com.js'></script>
</head>
<body>
<!-- BANNER contains the logobox div (star graphic), the bannertextbox
> div,
and the menubox div, the display area for
the cascading menu. NOT PRINTABLE in contentprint.css-->
<div id="banner">
<div class="logobox"> <img
src="../images/5_point_star_in_wreath_small_2.gif" alt="Graphic of State
Seal">
</div>
<!--END OF LOGOBOX DIV-->
<div class="bannertextbox"> DHS REGION 7 INTRANET<br>
PROUDLY SERVING CENTRAL TEXAS </div>
<!--END OF BANNERTEXTBOX DIV-->
<!--Menubox contains MenuPos div, which is where the cascading menu
displays-->
<div class="menubox">
<div id="MenuPos">&nbsp;</div>
</div>
<!--END OF MENUBOX DIV-->
</DIV>
<!--END OF BANNER DIV-->

*********FROM CONTENTPRINT STYLE SHEET****
#banner {display: none; }
.bannertextbox {display: none; }
.logobox { display: none; }
#MenuPos {display: none;}
.menubox {display: none; }

************************
Any suggestions on how to keep the top layer of the cascading menu from printing?

Jona
06-05-2003, 01:08 PM
Maybe this (http://www.w3.org/TR/CSS2/media.html) will help.. Since it's IE only, you could just specify a completely different text file to print, rather than use CSS.

Jona

Tom Servo
06-05-2003, 01:16 PM
We have over 500 pages on our Intranet, most of which contain information that can be printed. Maintaining a mirror site with text only is not an option.
Thanks for the suggestion, though.

Jona
06-05-2003, 01:23 PM
I see..

Jona