DJ WIce - Context menu script

Description

Example contextmenu in Explorer This DHTML/CSS script replaces the contextmenu of your visitors browser by one that fits the design of your webpage.
The menu items vary per browser (is a feature is not supported by a browser, it's not shown). Next to this text you'll see two examples of the contextmenu. On the lefthand side you'll see the MSIE 6 example and on the righthand side the Mozilla 1.3.1 example of the same menu.

This menu uses the oncontextmenu event of your browser and uses an IFRAME to be on top of selection boxes, flash movies and blinking cursors. It will always have the highest z-index on the page.
Because the menu is only usefull when it's onscreen, a script is implemented to make the menu stay on the visable window.

This script is only made for feature testing!
Never put the full script on you website, it's NOT user friendly to remove most of the normal contextmenu features.

Here you can download the latest version of the contextmenu.

Example contextmenu in Mozilla/Netscape

Set-up

required:
1) Unzip the file in your home directory.
2) Add following two lines between the <head> and </head> of your page.
	<script language="JavaScript" type="text/javascript" src="contextmenu/contextmenu.js"></script>
	<link rel="stylesheet" href="contextmenu/contextmenu.css">

optional:
3) You can set the home page location by altering the following code in menu.html:
		var homepage = "/";
   replacing "/" with your index-file (for example "/index.html").
4) You can change the colors in contextmenu.css to fit your own site.
5) Send me a thank you e-mail or a donation (see www.djwice.com/contextmenu.html)

Version information

This version is tested and works in MSIE 5+, Mozilla 1.3+ and NN 6+, other browsers might work too.
If you test it in other browsers and have suggestions for code alternations, please let me know.
The MSIE version has extra functions: zoom webpage, add to favorites and make this your homepage.
This version does not support detection of text selections or focused elements.
Also the copy/past and the "Open in New Window" features are not implemented.


Copyright

Copyright 2004 - DJ WIce Web Design

If you alter the code, please let me know your new enhancements, so I can put it in the next version of the script::

If you want to make a donation to encourage me to develop more scripts click the "Make a Donation" button on the right.

Flash movie: