Hiding the menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
darkcircuituk
Super Advanced
Super Advanced
Posts: 49
Joined: Sat Aug 21, 2004 2:57 pm

Hiding the menu

Post by darkcircuituk »

I am using the context right click menu and I wish to close the menu straight away after someone has executed a menu option and before the code behind the option is executed.

The main reason for this question is that currently when someone clicks the print option on my right click menu it opens the print screen (excellent) and the menu does close (after the user leaves the menu and the specified amount of time has passed), but when you print the page, the menu prints as well because it was displayed on the page when the print function was called, arrrgggghhhhhh.

Do you have a way of fixing this problem because it is driving me mad :-S

Thanks

Dave
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Doing a search for print will give you a number of results some of which deal with not printing the menu when printing a page, and checking under the main site DHTML menu Faqs will give you the complete directions for stopping the menu from printing.

Ruth
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Dave,

The FAQ Ruth referred to is this one. It's pretty clever, as it uses css media types combined with a built-in class called mmenu to turn off the menus when you print a page. Hoever, there are a couple of caveats. First, the "@ media" method won't work in NS4 (no biggie if you don't care about NS4). Second, you should be aware that the method discussed in the FAQ will turn off all of the menus on the page, not just the context menu. If you want to turn just the context menu off, we'll probably have to figure something else out.

Cheers,

Kevin
Post Reply