Min createPopup rykker sig?
Hej Alle..Jeg har lavet nogle divs, som når der aktiveres contextmenu viser nogle andre divs.
Mit problem er dog bare, at divene burde komme ved mouseevent + 5 osv., men lag 2 og 3 rykker sig underligt langt ned..
Er der nogle der kan forklare hvorfor det sker? Jeg har lavet et helt eksempel, da det jo måske kan være en anelse svært at forstå hvad jeg mener :)
<html>
<head>
<title></title>
<script type="text/javascript">
var oPopup = window.createPopup();
function richContext01() {
oPopup.document.body.innerHTML = oContext01.innerHTML;
oPopup.show(event.clientX, event.clientY, 100, 28, box01);
}
function richContext02() {
oPopup.document.body.innerHTML = oContext02.innerHTML;
oPopup.show(event.clientX, event.clientY, 100, 28, box02);
}
function richContext03() {
oPopup.document.body.innerHTML = oContext03.innerHTML;
oPopup.show(event.clientX, event.clientY, 100, 28, box03);
}
</script>
</head>
<body>
<!-- Begin context menu 01 -->
<div onClick="cOn(this);" id="box01" oncontextmenu="richContext01(); return false">
<p class="header">Her har vi noget tekst..</p>
</div>
<!-- End context menu 01 -->
<!-- Begin context menu 02 -->
<div onClick="cOn(this);" id="box02" oncontextmenu="richContext02(); return false">
<p class="header">Her har vi noget tekst..</p>
</div>
<!-- End context menu 02 -->
<!-- Begin context menu 03 -->
<div onClick="cOn(this);" id="box03" oncontextmenu="richContext03(); return false">
<p class="header">Her har vi noget tekst..</p>
</div>
<!-- End context menu 03 -->
<div id="oContext01" style="display:none">
<ul style="float:left;width:100px;height:28px;padding:0;margin:0;list-style-type:none;background-color:#ECE9D8;border-top:2px solid #F9F9F4;border-left:2px solid #F9F9F4;border-right:2px solid #959285;border-bottom:2px solid #959285;padding-left:2px;">
<li style="display:inline;width:23px;height:24px;background-repeat:no-repeat;background-position:50% 50%;padding-left:4px;padding-top:3px;" onmouseover="this.style.backgroundImage='url(btn_bg.jpg)';this.style.cursor='hand'" onmouseout="this.style.backgroundImage='';this.style.cursor=''" onclick="parent.window.open('http://')" title="View">123</li>
</ul>
</div>
<div id="oContext02" style="display:none">
<ul style="float:left;width:100px;height:28px;padding:0;margin:0;list-style-type:none;background-color:#ECE9D8;border-top:2px solid #F9F9F4;border-left:2px solid #F9F9F4;border-right:2px solid #959285;border-bottom:2px solid #959285;padding-left:2px;">
<li style="display:inline;width:23px;height:24px;background-repeat:no-repeat;background-position:50% 50%;padding-left:4px;padding-top:3px;" onmouseover="this.style.backgroundImage='url(btn_bg.jpg)';this.style.cursor='hand'" onmouseout="this.style.backgroundImage='';this.style.cursor=''" onclick="parent.window.open('http://')" title="View">123</li>
</ul>
</div>
<div id="oContext03" style="display:none">
<ul style="float:left;width:100px;height:28px;padding:0;margin:0;list-style-type:none;background-color:#ECE9D8;border-top:2px solid #F9F9F4;border-left:2px solid #F9F9F4;border-right:2px solid #959285;border-bottom:2px solid #959285;padding-left:2px;">
<li style="display:inline;width:23px;height:24px;background-repeat:no-repeat;background-position:50% 50%;padding-left:4px;padding-top:3px;" onmouseover="this.style.backgroundImage='url(btn_bg.jpg)';this.style.cursor='hand'" onmouseout="this.style.backgroundImage='';this.style.cursor=''" onclick="parent.window.open('http://')" title="View">123</li>
</ul>
</div>
</body>
</html>
