Du machst was falsch, ich hab es grad probiert das geht so.
Also um uns mal zu verständigen, ich habe das gebaut (jetzt mal nur für den Mozilla):
document.addEventListener("mouseout",function(e) {
if (!e.relatedTarget) {
alert("Maus außerhalb des Dokumentes!");
}
},false);
>
> Probier das mal bei dir aus, und sag mir wann bei dir ein alert - Meldung kommt. Bei mir kommt sie 2x, bei rein- und rausfahren ins document.
sie kommt jedesmal wenn du auf ein anderes Element kommst, probier mal das:
~~~javascript
window.document.onmouseout = function(e)
{
if(!e) e = window.event;
var target = e.target || e.srcElement;
if( target.tagName.toLowerCase() == 'html')
alert("Maus außerhalb des Dokumentes!");
}
~~~struppi.
--
[Javascript ist toll](http://javascript.jstruebig.de/) (Perl auch!)