Cry about...
Internet Explorer Troubleshooting

A Runtime Error has occurred.


When opening a page within Internet Explorer a dialog box is displayed titled ‘Error’ displaying the message:

A Runtime Error has occurred.
Do you wish to Debug?

Line: NN
Error: Object expected

What the error means:

Internet Explorer is displaying this message because it has encountered this error when trying to run some JavaScript on the page.

Possible Causes and Remedies:

  • The problem may be related not with the site but with the contents of Internet Explorer’s cache.

    Internet Explorer may be using some old files from its cache instead of retrieving newer versions from the site. Try deleting all of Internet Explorers temporary files (Tools > Internet Options ... > Delete Files ) and then refresh the page view. If the error persists then it is a fault with the page.

  • The page contains a genuine JavaScript error.

    If the page is yours (i.e. one that your are developing or one for which you are the webmaster responsible) then its up to you to debug the problem. Otherwise ignore the error (select ‘No’ to debug) and see if you can carry on.

    This error can be disabled:

    1. Within Internet Explorer select ‘Tools’, ‘Internet Options’.
    2. Select the ‘Advanced’ tab.
    3. Tick the option ‘Disable script debugging’ (under ‘Browsing’).
    4. For the setting change to take effect close down all Internet Explorer windows and restart.

    Note: If you are a JavaScript developer (or webmaster) then it is probably wise to leave script debugging enabled.

  • Problem with malware on your PC - typically if the problem seems to affect a large number of sites and not just the occasional one.

    This tip was kindly provided by Catriona Chaplin: "For anyone getting that Runtime error popup all the time despite changing their Disable script debugging setting and the existing MS tips, my recommendation is: Try a complete scan with SpyBot (or similar) first."

These notes have been tested with Windows 2000, Windows XP and Windows Vista and Internet Explorer 6.

About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.