(Internet Explorer Only) Displays a menu when the visitor right click's on the page. You can easily use style sheets to modify the menu skins, or write your own.
Go Back
Go Home
JS Forum
Site FAQs
Link to Us
Contact Us
Just right click on the page for the demo
Add the below code to the <body> section of your page:
<scriptlanguage="javascript"type="text/javascript"> /* Visit http://www.yaldex.com/
for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin var
menuskin ="skin1";// skin0, or skin1 var
display_url =0;// Show URLs in status bar? function
showmenuie5(){ var
rightedge =document.body.clientWidth-event.clientX; var
bottomedge =document.body.clientHeight-event.clientY; if(rightedge
<
ie5menu.offsetWidth) ie5menu.style.left=document.body.scrollLeft+event.clientX-
ie5menu.offsetWidth; else ie5menu.style.left=document.body.scrollLeft+event.clientX; if(bottomedge
<
ie5menu.offsetHeight) ie5menu.style.top=document.body.scrollTop+event.clientY-
ie5menu.offsetHeight; else ie5menu.style.top=document.body.scrollTop+event.clientY; ie5menu.style.visibility="visible"; returnfalse;
} function
hidemenuie5(){ ie5menu.style.visibility="hidden";
} function
highlightie5(){ if(event.srcElement.className=="menuitems"){ event.srcElement.style.backgroundColor="highlight"; event.srcElement.style.color="white"; if(display_url) window.status=event.srcElement.url; }
} function
lowlightie5(){ if(event.srcElement.className=="menuitems"){ event.srcElement.style.backgroundColor=""; event.srcElement.style.color="black"; window.status=""; }
} function
jumptoie5(){ if(event.srcElement.className=="menuitems"){ if(event.srcElement.getAttribute("target")!=null) window.open(event.srcElement.url,event.srcElement.getAttribute("target")); else window.location=event.srcElement.url; }
} // End --> </script> <divid="ie5menu"class="skin0"onMouseover="highlightie5()"onMouseout="lowlightie5()"onClick="jumptoie5();">