/ Published in: C#
*IE7 sometimes complains that a JavaScript script is running too slow and asks the user whether they want to terminate it or continue.
*To get rid of this annoying popup a few changes need to be made to the registry.
*ref: http://www.itwriting.com/blog/119-ie7-script-madness.html
*To get rid of this annoying popup a few changes need to be made to the registry.
*ref: http://www.itwriting.com/blog/119-ie7-script-madness.html
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Win32; namespace RegistryUpdateForIEScriptProblem { class Program { /// <summary> /// IE7 sometimes complains that a JavaScript script is running too slow and asks the user whether they want to terminate it or continue. /// To get rid of this annoying popup a few changes need to be made to the registry. /// ref: http://www.itwriting.com/blog/119-ie7-script-madness.html /// </summary> /// <param name="args"></param> static void Main(string[] args) { RegistryKey RegKeyWrite = Registry.CurrentUser; RegKeyWrite = RegKeyWrite.CreateSubKey(@"Software\Microsoft\Internet Explorer\Styles"); RegKeyWrite.SetValue("MaxScriptStatements", 1000000000); RegKeyWrite.Close(); RegistryKey RegKeyRead = Registry.CurrentUser; RegKeyRead = RegKeyRead.OpenSubKey(@"Software\Microsoft\Internet Explorer\Styles"); Object regSuccessful = RegKeyRead.GetValue("MaxScriptStatements"); RegKeyRead.Close(); Console.WriteLine("IE7 will no longer complain about scripts running too slow"); Console.ReadLine(); } } }