Forum Moderators: open
I've got some code that tracks where a user's mouse is on a page and for some reason, it's triggering IE's active content warning because I have SP2 installed.
Anybody have any idea what part of this code is causing that, and if possible, what to change to achieve the same effect without causing that warning to pop-up?
Here's the code:
<html><head>
<script><!--
var pointsToRegister = 0.05;
var pointNumber = 0;
registered = new Array();
lx=0;
ly=0;
function listener(e) {
if(!e) e = window.event;
pointNumber++;
if(pointNumber > 1 / pointsToRegister) {
pointNumber = 0;
registerPoint(e);
}
}
function registerPoint(e) {
registered.x = e.clientX + document.body.scrollLeft;
registered.y = e.clientY + document.body.scrollTop;
lx = registered.i;
ly = registered.j;
registered.i = parseInt(registered.x / 100);
registered.j = parseInt(registered.y / 100);
getPoint();
}
function getPoint() {
window.status = registered.i + " " + registered.j
}
// -->
</script>
</head>
<body bgcolor="#ffffff" onmousemove="listener()">
<p>Registered points:</p>
<p id="points"></p>
</body>
</html>
if you wish to remove the warning altogether....
- open IE
- click 'Tools'
- click 'Internet Options'
- click 'Advanced'
- scroll down to 'Security'
- check 'Allow active content to run in files on My Computer'
- click 'Apply'
- click 'OK'
- have a beer ;)
birdbrain