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.
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.
- Visit this link and click on Java Download.
- Click on Agree and Start Free Download.
- Double-click the downloaded Java Setup executable and click Install.
- Follow the on-screen instructions to complete the installation.
- Restart your computer once the installation is complete.
- 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.
- Press Windows key + R to open a Run dialog. Type “control” and press Enter to launch the Control Panel.
- In the Control Panel, search for “internet options” and click on Internet Options from the results.
- Go to the Advanced tab.
- In Settings, scroll to Browsing and uncheck Enable third-party browser extensions.
- Click Apply, then restart your computer.
- 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.
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.
- Press Windows key + R, type “Regsvr32 urlmon.dll“, and press Enter.
- If prompted by UAC, click Yes.
- If successful, you will see: “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.
- Press Windows key + R to open a Run dialog box. Type “control” and press Enter to open the Control Panel.
- In the Control Panel’s search box (top right), type “internet options” and press Enter.
- Click on Internet Options from the search results.
- In the Internet Properties window, go to the Advanced tab and scroll to the Browsing category.
- Uncheck Display a notification about every script error.
- Click Apply at the bottom-right to save changes.
- Upon the next browser restart, script error notifications should be disabled.