menu?
Hej, jeg er ved at lave en 3dchat/2dchat, men jeg har lige problemer med en menu der skal blive vist når man højreklikker på den, nogen der kan hjælpe?MENUEN:
<script>
function funcconfirm(link,msg)
{
ok = confirm(msg);
if (ok) { window.print() }
}
</script>
<style>
.skin0{
position:absolute;
width:85px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
line-height:20px;
cursor:default;
visibility:hidden;
}
.skin1{
cursor: default;
font: menutext;
position: absolute;
width: 85px;
background-color: #F2F2F2;
border: 1 solid buttonface;
visibility:hidden;
border: 2 outset buttonhighlight;
}
.menuitems{
padding-left:15px;
padding-right:10px;
}
-->
</style>
<script language="JavaScript1.2">
var menuskin=1
var display_url=0
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"
return false
}
function hidemenuie5(){
ie5menu.style.visibility="hidden"
}
function highlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor="#A6C4E1"
event.srcElement.style.color="#F3F3F3"
if (display_url==1)
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
}
}
</script>
<script language="JavaScript1.2">
if (document.all)
</script>
<!--[if IE]>
<font size="1" color="black" face="tahoma">
<div id="ie5menu" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5()">
<div class="text" title="<?$userinfo[nick]?>"> <?$userinfo[nick]?></div>
<div class="menuitems" url="chatinfo.php?id=<?$userinfo[id]?>" target="right">Chatter-info</div>
<div class="menuitems" url="lejlighed.php?roomid=<?$roominfo[id]?>" target="middel">Lejlighed</div>
<div class="menuitems" url="skrivmail.php?modtager=<?$userinfo[id]&afsender=<?$cok_id?>" target="right">Skriv mail</div>
<div class="menuitems" url="guestbook.php?id=<?$userinfo[id]" target="right">Gæstebog</div>
<hr color="black" size="1">
<div class="text" title="<?$roominfo[name]?>"> <B>Rum</B></div>
<div class="text" title="<?$roominfo[name]?>"> <?$roominfo[name]?></div>
<hr size="1" color="black">
<div class="text"><B> Admin</B></div>
<div class="menuitems" url="kick.php?kickid=<?$userinfo[id]?>" target="right">Kick</div>
<div class="menuitems" url="ban.php?kickid=<?$userinfo[id]?>" target="right">Ban</div>
</div></font>
<![endif]-->
<script language="JavaScript1.2">
if (document.all&&window.print){
if (menuskin==0)
ie5menu.className="skin0"
else
ie5menu.className="skin1"
document.oncontextmenu=showmenuie5
document.body.onclick=hidemenuie5
}
</script>
<html>
<head>
</head>
<body>
</body>
</html>
HER SKAL DEN KOMME FREM NÅR MAN HØJREKLIKKER:
<div id="<?$xyinfo[id]?>" style="position:absolute; width:68px; height:62px; z-index:6; left: <?$xyinfo[x]?>px; top: <?$xyinfo[y]?>px"><img src="/gfx/figur/<?$userinfo[pic]?>" border="0"><br><center><font size="1" face="tahoma" color="white"><?$userinfo[nick]?></div>