Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:18

printing issue


Poster: aerish
Dated: Wednesday August 20 2003 - 15:56:21 BST

we are using a DHTML vertical menu in left column of our page; when we print the web page, the DHTML menu prints in the middle, on top of the web page content... is there a way to correct this? we would like the menu either to print from its spot on the page, or not print at all, or print from a different spot on the page where it wouldn't block HTML text...

i have tried playing with screen position and menu placement, but to no avail

any advice is appreciated...


Poster: John
Dated: Wednesday August 20 2003 - 16:24:19 BST

I have a similar problem here when printing to an HP1200. The menu is in position, but severely twisted so as not to be readable. When I print the same page to an HP8500 it is perfect. The only solution I have is to try a different printer, as it seems to be a driver problem.

Sorry...


Poster: Hergio
Dated: Wednesday August 20 2003 - 17:44:26 BST

If you want to have the menu NOT print, then create a style (either on the page or in a css file like I do here):
Code:
<!-- Styles for turning off things for print -->
.noprint{
   display: block;   }
.printonly{
   display: none;   }

__at__ media print{
   .printonly{
      display: block;      }
   .noprint{
      display: none;      }
}

Then in your page, around where you include your scripts, put a div tag around them with the class set to noprint and it will hide the menu for print. See...
Code:
<div class="noprint">
<SCRIPT language=JavaScript src="/inc/menu/milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="/menu_data.js" type=text/javascript></SCRIPT>
</div>

The browser should listen to the css, as mine did with IE 6. I use these noprint and printonly css styles to precisely control what gets shown and what gets printed. It makes my pages print a whole lot better! Good luck.


Poster: Andy
Dated: Wednesday August 20 2003 - 18:00:31 BST

Great bit detective work there Dave :D

Also, just to re-iterate printing and the menu. If you declare a style sheet of type media=print and then place this little snippet in the CSS file, it will do pretty much the same thing.

Code:
.mmenu
{
   position:absolute;
   display:none;
}



Cheers
Andy


Poster: Marc-Andre.Roberge __at__ mus.ul
Dated: Thursday August 21 2003 - 18:28:16 BST

I have used Hergio's code to prevent my menu from being printed. What it does it to print the menu entries without the darker background. This is OK with me, but there is curiously a big backslash covering the entire height of the menu bar being printed at the very left. I am using an HP LaserJet 2200D. Is this a bug in the menu? This happens with both version 3.5 and version 5.


Poster: AndrewRoazen
Dated: Friday August 29 2003 - 19:43:25 BST

BTW, you want to use the LINK tag syntax for referring to your hidemenus.css to ensure NN4 respects it:
Code:
<link href="hidemenus.css" rel="stylesheet" media="print" type="text/css" />

A funny bug in NN4 has resulted in our homepage being print rendered as a blank sheet (in NN4) unless this line is added.


Poster: Maz
Dated: Friday August 29 2003 - 22:10:01 BST

I understand adding no print to the style sheet.
What is Andy saying Media=Print?
Where does that go? At the top of each menu data?

Thanks
maz


Poster: AndrewRoazen
Dated: Friday August 29 2003 - 23:47:22 BST

What he means is, take the CSS code he was showing, save it as print.css and then link to it in your HTML the way I demonstrated. Nothing changes in your .js files.


Poster: Hergio
Dated: Sunday August 31 2003 - 18:42:17 BST

Max by linking the way Andrew mentioned (with the media=print) it basically tells the page that when its about the be printed, use these styles instead of the regular ones. It allows you to have a page print differently then viewed on screen. If you prefer not to link your style sheets, and do them inline on the page (in the head) you specify which style properties to use when printing using my method described above.


Poster: Maz
Dated: Sunday August 31 2003 - 18:54:18 BST

Oh, so Andys method is to change the page styles on print, if I want to keep the page layout styles I should use your method.

That's a Mazzzzz Raz Ma' Taz and all that jazz. :D


Poster: Hergio
Dated: Monday September 1 2003 - 20:01:35 BST

no both of our ways will change it for print...it just a matter of where do you want to specify the style. In an included file or defining in the page. My option used a div tag around the menu to hide it, thats before I knew that we could reference the .mmenu class and override it for print. But you can either include the style in a CSS or inline in the page.


Poster: Maz
Dated: Monday September 1 2003 - 21:14:11 BST

Okay, must go back to Andys suggestion again, for some reason my page is starting after the menu in IE 5.1.6, I thought it was when I added the radio button, had a lot of problems getting it right, then I put followscroll back in, but it could be the div tag on a mac.

Thanks for reminding me.
maz


Poster: John
Dated: Tuesday September 2 2003 - 17:27:26 BST

I'm sure you know this, maz, but do one change at a time. With multiples, if (when) something goes wrong, it's a lot tougher figuring out the cause.

Remember - Murphy lives :!:

I.E. 6 sp 1 issue?


Poster: trevc
Dated: Thursday January 29 2004 - 21:06:42 GMT

I've got the styles"

#menu0 {display: none;}
.mmenu {position:absolute; display:none; }

in a stylesheet (media = print).

In preview the menu is gone, but when the paper comes out the printer, the content in the place where the menu cascades out to is blank.

Using the same page in Mozilla 1.5/1.6 works FINE. Bug in I.E. 6? Anyone else having the same issue? Workaround?

thanks
./tc


Poster: John
Dated: Thursday January 29 2004 - 21:27:35 GMT

It's a little tough without seeing the actual code setup, but I think that should work.

What you're trying is close to the article at http://www.macromedia.com/devnet/mx/dreamweaver/articles/screen_to_print.html. Maybe that will help.