Greetings all!
I am coding a small function that will scroll through a page, pausing at certain points for ten seconds, then carrying on again (for an automated presentation of web-based data).
The problem I have is this:
Everytime the script runs I get the error "A script on this page is causing Internet Explorer to run slowly".
I have found a workaround on the microsoft site (<!-- m --><a class="postlink" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q175500">http://support.microsoft.com/default.as ... us;Q175500</a><!-- m -->), but that requires changing the registry and that impossible for me in a company environment.
Is there a code-based workaround that anyone knows of??
Please!
The code I am using is below:
<script language="javascript">
<!--
//alert(parent.mainframe.document.top)
function doScroll() {
var lastScroll = 1600;
var scrollPauses = new Array()
var scrollPausePointer = 0
scrollPauses[0] = 250;
scrollPauses[1] = 580;
scrollPauses[2] = 910;
scrollPauses[3] = 1240;
scrollPauses[4] = 1570;
for (i = 1; i <= lastScroll; i++){
parent.mainframe.scroll(1,i);
if(i==scrollPauses[scrollPausePointer]){
pause(5000)
scrollPausePointer++
}
}
}
function pause(numberMillis) {
var now = new Date();
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if (now.getTime() > exitTime)
return;
}
}
setTimeout("doScroll()",1000);
//-->
</script>
I am coding a small function that will scroll through a page, pausing at certain points for ten seconds, then carrying on again (for an automated presentation of web-based data).
The problem I have is this:
Everytime the script runs I get the error "A script on this page is causing Internet Explorer to run slowly".
I have found a workaround on the microsoft site (<!-- m --><a class="postlink" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q175500">http://support.microsoft.com/default.as ... us;Q175500</a><!-- m -->), but that requires changing the registry and that impossible for me in a company environment.
Is there a code-based workaround that anyone knows of??
Please!
The code I am using is below:
<script language="javascript">
<!--
//alert(parent.mainframe.document.top)
function doScroll() {
var lastScroll = 1600;
var scrollPauses = new Array()
var scrollPausePointer = 0
scrollPauses[0] = 250;
scrollPauses[1] = 580;
scrollPauses[2] = 910;
scrollPauses[3] = 1240;
scrollPauses[4] = 1570;
for (i = 1; i <= lastScroll; i++){
parent.mainframe.scroll(1,i);
if(i==scrollPauses[scrollPausePointer]){
pause(5000)
scrollPausePointer++
}
}
}
function pause(numberMillis) {
var now = new Date();
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if (now.getTime() > exitTime)
return;
}
}
setTimeout("doScroll()",1000);
//-->
</script>