How to Fix ‘An Error Has Occurred in the Script On This Page’

The error message “An error has occurred in the script on this page” often stops a webpage or app from working. This happens when the browser has trouble running JavaScript or VBScript, usually because of old libraries or clashes between browser add-ons and security settings.

An error has occurred in the script on this page.

It’s mainly caused by scripts that don’t work well together or are blocked, but it can also be due to damaged system files or incorrect browser settings.

1. Install Java for Windows

The main reason for the issue is that Java is not installed on the computer. Many users have fixed the problem by installing the latest Java version.

Note: Microsoft Edge does not support any plug-ins and doesn’t use Java. If you’re having this issue in Microsoft Edge, move on to the next solution since this won’t help you.

  1. Visit this link and click on Java Download.
  2. Click on Agree and Start Free Download.
    Installing Java for Windows
  3. Double-click the downloaded Java Setup executable and click Install.
    Installing Java for Windows
  4. Follow the on-screen instructions to complete the installation.
  5. Restart your computer once the installation is complete.
  6. Check if the issue is resolved by performing the same action that triggered the error.

2. Disable Third-party Browser Extensions

When the machine uses third-party browser add-ons for Internet Explorer, it can create security risks and errors. Because of this, Microsoft decided to keep this option turned off by default in the latest Windows versions.

Some users have found that the error message stopped appearing after they disabled any third-party browser add-ons in Internet Explorer.

  1. Press Windows key + R to open a Run dialog. Type “control” and press Enter to launch the Control Panel.
  2. In the Control Panel, search for “internet options” and click on Internet Options from the results.
  3. Go to the Advanced tab.
  4. In Settings, scroll to Browsing and uncheck Enable third-party browser extensions.
  5. Click Apply, then restart your computer.
  6. After restart, repeat the action that caused the ‘An error has occurred in the script of this page‘ error to check if it’s resolved.
    Disabling Browser Extensions in IE

3. Register the urlmon.dll File

Many users fixed the issue by re-registering the urlmon.dll file. This DLL is commonly used by Internet Explorer scripts.

  1. Press Windows key + R, type “Regsvr32 urlmon.dll“, and press Enter.
    Registering the urlmon.dll file
  2. If prompted by UAC, click Yes.
  3. If successful, you will see: “DllRegisterServer urlmon.dll succeeded“.
    DllRegisterServer urlmon.dll succeeded

4. Disable Script Error Notifications

If the issue persists, you can disable the error notifications to stop seeing the ‘An error has occurred in the script of this page’ message. This won’t actually fix the error but will hide the notification.

Note: This is just a workaround, not a real solution. It won’t address any underlying problems causing functionality loss.

  1. Press Windows key + R to open a Run dialog box. Type “control” and press Enter to open the Control Panel.
  2. In the Control Panel’s search box (top right), type “internet options” and press Enter.
  3. Click on Internet Options from the search results.
  4. In the Internet Properties window, go to the Advanced tab and scroll to the Browsing category.
  5. Uncheck Display a notification about every script error.
  6. Click Apply at the bottom-right to save changes.
  7. Upon the next browser restart, script error notifications should be disabled.
    Disabling Script Error Notifications for IE
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.