Forum Moderators: open

Message Too Old, No Replies

Why does this javascript tigger IE (SP2) active content warning?

I would think many people would've run into this problem...

         

vega123

8:55 pm on Mar 25, 2005 (gmt 0)

10+ Year Member



Would appreciate anybody's help on this...

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>

kaled

1:40 am on Mar 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It affects all javascript when run on a local computer. If you upload your code, it should run fine.

Kaled.

birdbrain

3:14 pm on Mar 31, 2005 (gmt 0)



Hi there vega123,

if you wish to remove the warning altogether....


  1. open IE
  2. click 'Tools'
  3. click 'Internet Options'
  4. click 'Advanced'
  5. scroll down to 'Security'
  6. check 'Allow active content to run in files on My Computer'
  7. click 'Apply'
  8. click 'OK'
  9. have a beer ;)

birdbrain