Hallo,
function divEvent() {
if(nc) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = divPos;
}
Wann wird diese Funktion ausgeführt?
Ich hab mal die Satuszeile missbraucht, um Dir zu zeigen, dass die Maus _ständig_ überwacht wird.
<html>
<head>
<script type="text/javascript">
var yPos;
var xPos;
var nc = (document.captureEvents);
if(nc) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = divPos;
function divPos(e)
{
yPos = (nc)? e.pageY : window.event.y;
xPos = (nc)? e.pageX : window.event.x;
document.getElementById('Details').style.left = xPos;
document.getElementById('Details').style.top = yPos;
document.getElementById('Details').innerHTML = xPos + ":" +yPos;
window.status=xPos + ":" +yPos;
}
</script>
</head>
<body bgcolor="#ffffff">
<div id="Details" style="position:absolute; z-index:1; visibility:hidden; background-color:#00AEAD;"> </div>
<a href="#" onmouseover="document.getElementById('Details').style.visibility='visible'" onmouseout="document.getElementById('Details').style.visibility='hidden'">Hier mit der Maus drüber fahren</a>
</body>
</html>
viele Grüße
Axel