M
Michael Christensen
The following works fine in IE -> what am I missing to make it work in
Firefox - an example would be great?
I can't figure it out
------------------------------------------------
<body>
<script language="javascript">
var IE = document.all?true:false;
if (!IE) document.captureEvents(event.MOUSEMOVE);
document.onmousemove = getMouseXY;
var x,y,tmpcords;
function getMouseXY(e) {
if(IE){
x = event.clientX + document.body.scrollLeft;
y = event.clientY + document.body.scrollTop;
} else {
x = e.pageX;
y = e.pageY;
}
//Check if length is above 1200
if(document.all._clientEyeTextbox.value.length > 1200){
return calc();
document.all._clientEyeTextbox.value = '';
} else {
document.all._clientEyeTextbox.value =
document.all._clientEyeTextbox.value + x + ',' + y + ',';
//document.all.a.value = document.all.a.value + x + ',' + y + ',';
}
}
</script>
</body>
Firefox - an example would be great?
I can't figure it out
------------------------------------------------
<body>
<script language="javascript">
var IE = document.all?true:false;
if (!IE) document.captureEvents(event.MOUSEMOVE);
document.onmousemove = getMouseXY;
var x,y,tmpcords;
function getMouseXY(e) {
if(IE){
x = event.clientX + document.body.scrollLeft;
y = event.clientY + document.body.scrollTop;
} else {
x = e.pageX;
y = e.pageY;
}
//Check if length is above 1200
if(document.all._clientEyeTextbox.value.length > 1200){
return calc();
document.all._clientEyeTextbox.value = '';
} else {
document.all._clientEyeTextbox.value =
document.all._clientEyeTextbox.value + x + ',' + y + ',';
//document.all.a.value = document.all.a.value + x + ',' + y + ',';
}
}
</script>
</body>