Entry
IE or Netscape browser shows "script on this page is causing browser to run slowly"
Apr 8th, 2008 19:07
ha mo, Abolfazl Shirazi, soma shekar,
Abolfazl Shirazi:
Good Question!
You will see this message in your browser when there is an infinite
loop or a very long loop in your script.
For example, In the page below you will see that message because there
is an unlimited loop in (do {} While()):
<!-- Begin -->
<html>
<head>
<script language="javascript">
function start() {
i=1
do {
document.write("hello<br>")
}
while(i == 1)
}
</script>
</head>
<body onload="start()">
</body>
</html>
<!-- End -->
Or you will see this message even when there is a limited but very
long loop in your script. For example, a script which made a loop that
repeat for over 10000 times. See the page below:
Enjoy It Friend!!!
<!-- Begin -->
<html>
<head>
<script language="javascript">
function start() {
for(i=0;i<10000;i++) {
document.write("hello<br>")
}
}
</script>
</head>
<body onload="start()">
</body>
</html>
<!-- End -->
You will see this message usually when a loop repeats for more than
8000 or 9000 times!
Remember that the scripts above are just some simple examples in order
that you find out the answer.
Have Fun!
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com