Prøv den her:
<HTML>
<HEAD>
<style>
#menu{
position:absolute;
width:125px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
line-height:20px;
cursor:default;
visibility:hidden;
}
.menuitems{
padding-left:15px;
padding-right:15px;
}
</style>
<script language="JavaScript1.2">
//set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar
var display_url=1
function showmenu(){
var rightedge=document.body.clientWidth-event.clientX
var bottomedge=document.body.clientHeight-event.clientY
if (rightedge<menu.offsetWidth)
menu.style.left=document.body.scrollLeft+event.clientX-menu.offsetWidth
else
menu.style.left=document.body.scrollLeft+event.clientX
if (bottomedge<menu.offsetHeight)
menu.style.top=document.body.scrollTop+event.clientY-menu.offsetHeight
else
menu.style.top=document.body.scrollTop+event.clientY
menu.style.visibility="visible"
return false
}
function hidemenu(){
menu.style.visibility="hidden"
}
function over(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor="highlight"
event.srcElement.style.color="yellow"
if (display_url==1)
window.status=event.srcElement.url
}
}
function out(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor=""
event.srcElement.style.color="black"
window.status=''
}
}
function linkTo(){
if (event.srcElement.className=="menuitems")
window.location=event.srcElement.url
}
</script>
<script>
</script>
<TITLE>Menu med Højre/Venstreklik</TITLE>
</HEAD>
<BODY>
<!--[if IE 5]>
<br><CENTER><B>Right Click for the Menu<br><br>Left Click to close the Menu</B></CENTER>
<![endif]-->
<br><br>
<![if ! IE 5]>
<br><center><b>sorry, this script requires Internet Explorer, Version 5+</b></center>
<![endif]>
<div id="menu" onMouseover="over()" onMouseout="out()" onClick="linkTo()">
<div class="menuitems" url="
http://anypage1.htm">Menu One</div>
<div class="menuitems" url="
http://anypage2.htm">Menu Two</div>
<div class="menuitems" url="
http://anypage3.htm">Item Three</div>
<div class="menuitems" url="
http://anypage4.htm">Item Four</div>
<div class="menuitems" url="
http://anypage5.htm">Site Five</div>
<hr>
<div class="menuitems" url="mailto:rbennett@thezone.net">Email Me!</div>
</div>
<script language="JavaScript1.2">
document.oncontextmenu=showmenu
if (document.all&&window.print)
document.body.onclick=hidemenu
</script>
</BODY>
</HTML>
Fomse:-)