I have been researching a problem where a very complex piece of JavaScript code is occasionally causing the very annoying warning which states “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?”". While developers have patience for this problem, customers do not, and should not, have to deal with this.
Since the error is only impacting one user within one customer installation I am pushing off a complete rewrite of the JavaScript until our next release. However, this Microsoft knowledge-base article provides instructions for working around the problem on a machine by machine basis. Here is the summary for how you change this behavior for IE 4.0 and above:
- Using a Registry Editor such as Regedt32.exe, open this key:
HKEY_CURRENT_USER\Software\Microsoft\InternetExplorer\Styles - Note If the Styles key is not present, create a new key that is called Styles.
Create a new DWORD value called “MaxScriptStatements” under this key and set the value to the desired number of script statements.
I ended up adding the key with a value of 500000000 (5 Million) and the customer is now happy.
John












