A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive.

Your get one of these errors when running Internet Explorer:
Stop running this script?
A script on this page is causing Internet Explorer to run slowly.
If it continues to run, your computer might become unresponsive.

"A script on this page is causing Internet Explorer to run slowly.  If it continues to run, your computer may become unresponsive." "Do you want to abort the script?"

Explanation:
When Internet Explorer runs more than 5 million lines of script, you will get this error.  If you choose to continue, the counter is reset and after another 5 million lines of script, you will get the error again.

Workarounds:
Reduce the number of iterations/statements in the code.  If you run Process Monitor and see what registry keys are read, you will see a client side registry key related to lines of code but this is not practical to use because you would not be able to push this registry setting down to all clients.  Also, since it is not documented, it is not supported.

Sample to create the problem:

<html>

<head>

</head>

<script language="javascript">

var totCount=0;

function loopy()

{

// i - 100K iteration loop

for (var i=0; i<100000; i++)

{

jloop();

}

alert (totCount);

}

function jloop()

{

// 10 iterations (1 million total with this)

for (var j=0; j<10; j++)

{

kloop();

}

}

function kloop()

{

//k - 5 iterations

for (var k=0; k<5; k++)

{

totCount++;

}

}

</script>

<body>

<input type="submit" name="btn_Login" value="Login" onclick="loopy(); " language="javascript" id="btn_Login" />

</body>

</html>