‘An error has occurred in the script on this page’ [5 Solutions]

Script errors are still a common occurrence among Internet surfers. And it’s not just restricted to web browsers as you might think. The ‘An error has occurred in the script of this page’ is mostly reported with Internet Explorer, but there are a lot of programs that use IE scripts, so the issue is reported in conjunction with a lot of different application. As it turns out, the issue is not exclusive to a certain Windows version since it’s confirmed to occur on all the most recent versions including Windows 7, Windows 8.1 and Windows 10.

An error has occurred in the script on this page.

What is causing the ‘An error has occurred in the script of this page’ issue?

We investigated this particular issue by looking at various user reports and the repair strategies that are most commonly used to resolve this problem. Based on our investigations, there are several different culprits that might be responsible for this issue:

  • Java is missing from the Windows machine – One of the most common scenarios in which this error will occur is when the script is trying to run on a machine that doesn’t have the Java environment installed. If this scenario is applicable, you will be able to resolve the error by installing Java on your PC.
  • 3rd party browser extensions are enabled for IE – If you previously configured Internet Explorer to be allowed to use 3rd party browser extensions, there’s a high chance that you just identified the culprit. In this case, you should be able to resolve the issue by disabling 3rd party browser extensions for IE.
  • urlmon.dll is unregistered – This Dynamic Link Library file is one of the most likely culprits when it comes to this error. The vast majority of scripts that are running in IE will not function unless this file is registered. If this scenario is applicable, you should be able to resolve the issue by registering urlmon.dll.
  • Script error notifications are enabled – Keep in mind that this error will only appear as long as script error notifications are permitted to appear. If you only wish to prevent the error pop-ups from interrupting your browsing sessions, you should be able to do this by disabling script error notifications.
  • KMP script is being blocked by IE – In case you’re encountering the error when using KMPlayer, chances are it’s because of a Google Analytics plugin that is used by the video playback program. If this scenario is applicable, you will be able to resolve the issue by adding the web script to the list of Restricted sites.

If you’re currently trying to resolve this particular error, this article will provide you with several troubleshooting steps. Down below, you’ll find a collection of methods that other users in a similar situation have successfully used to resolve the ‘An error has occurred in the script of this page’. Each of the potential fix featured below is confirmed to work by at least one affected user.

For the best results, we advise you to follow the fixes in the order that they are presented in since they are ordered by efficiency and severity. One of them is bound to resolve the issue, regardless of which culprit ends up causing the problem.

If you find any method that is not applicable to your particular scenario, skip it and continue with the next one below.

1. Installing Java for Windows

When it comes to the ‘An error has occurred in the script of this page’ error, by far the most popular culprit is the fact that Java is not installed on the affected machine. A lot of affected users have reported that they managed to resolve the issue after they installed the latest JAVA version on their computer.

Note: Keep in mind that Microsoft Edge does not support any plug-ins, so it doesn’t use Java. If you’re encountering this issue in Microsoft Edge, skip to the next method below since this one will not be effective for you.

This fix could potentially also be effective for those in which the error is caused by an incomplete or corrupted Java installation.

Here’s a quick guide on installing Java on Windows:

  1. From a healthy browser, visit this link (here) and click on Java Download.
  2. On the next screen, click on Agree and Start Free Download.
    Installing Java for Windows
  3. Once the Java Setup executable is downloaded, double-click on it and click Install at the first prompt to begin the installation.
    Installing Java for Windows
  4. Follow the rest of the on-screen instructions to complete the installation of Java for Windows.
  5. Once the process is complete and Java is installed, restart your computer.
  6. When the next startup sequence is complete, check if the issue has been resolved by replicating the same action that was previously triggering the error.

If the  ‘An error has occurred in the script of this page’ error is still occurring,  move down to the next method below.

2. Disabling 3rd party browser extensions

Another fairly common scenario in which the  ‘An error has occurred in the script of this page’ error occurs is those instances where the machine is allowed to use third-party browser extensions for Internet Explorer. This opens up the system for a lot of security holes and errors such as this one – This is precisely why Microsoft decided to leave this option turned off by default on the most recent Windows versions.

Some users encountering that we’re also encountering this error have reported that the error message stopped occurring after they performed the steps necessary to disable any 3rd party browser extensions used by IE.

Here’s a quick guide on how to do this:

  1. Press Windows key + R to open up a Run dialog box. Then, type “control” and press Enter to open up the classic Control Panel interface.
  2. Once you’re inside the control panel window, use the search function in the top-right corner to search for “internet options“. Then, click on Internet Options from the search results.
  3. Inside the Internet Properties screen, select the Advanced tab from the bar at the top.
  4. Scroll down through the list of Settings to Browsing and make sure that the checkbox associated with Enable third-party browser extensions is disabled.
  5. Click on Apply to save the changes, then restart your computer.
  6. At the next startup sequence, replicate the same action that was previously triggering the issue and see if you managed to resolve the ‘An error has occurred in the script of this page’ error.
Disabling Browser Extensions in IE

If the same error is still occurring, move down to the next method below.

3. Registering the urlmon.dll file

Several users that we’re also encountering the ‘An error has occurred in the script of this page’ error have reported that they were able to resolve the issue by re-registering the urlmon.dll file. This file is one of the most widely used Dynamic Link Library files that is used by scripts powered by Internet Explorer.

Even if you’re not tech-savvy at all, you should be able to follow the steps below (regardless of which Windows version you’re using). Here’s a quick guide on re-registering the urlmon.dll file:

  1. Press Windows key + R to open up a Run dialog box. Then, type “Regsvr32 urlmon.dll” and press Enter to initiate the command and register the file.
    Registering the urlmon.dll file
  2. If you’re prompted by the UAC (User Account Control prompt), click Yes.
  3. If the procedure is successful, you will see the following message “DllRegisterServer urmon.dll succeeded”

    DllRegisterServer urmon.dll succeeded

    If the ‘An error has occurred in the script of this page’ error is still occurring, move down to the next method below.

4. Disabling Script Error notifications

If none of the methods above have allowed you to resolve the issue, there’s one surefire way to make sure you’ll not see the ‘An error has occurred in the script of this page’ error again. You can actually specifically disable the annoying notifications to ensure that you won’t be bothered again.

But keep in mind that this method is not a proper fix, but a workaround. Following the steps below will only hide the notification that is signaling the error and will not fix it in any way. If you’re also experiencing some functionality loss then this fix will not resolve it.

If you decide to go this route, here’s a quick guide on disabling script error notifications:

  1. Press Windows key + R to open up a Run dialog box. Then, type “control” and press Enter to open up the classic Control Panel Interface.
  2. Once you’re inside the Classic Control Panel Interface, use the search function in the top right corner to search for “internet options” and press Enter.
  3. From the search results, click on Internet Options.
  4. Inside the Internet Properties screen, select the Advanced tab and scroll down to the Browsing category.
  5. Once you get there, uncheck the box associated with Display a notification about every script error.
  6. Click on Apply in the bottom-right corner to save the modifications.
  7. Starting with the next browser restart, you should no longer see any ‘An error has occurred in the script of this page’ errors.
Disabling Script Error Notifications for IE

If you’re encountering this issue with KMPlayer, move down to the next method below.

5. Blocking Google Analytics for KMPlayer (if applicable)

If you’re encountering this issue while trying to open a video with KMPlayer, chances are the  ‘An error has occurred in the script of this page’ error is occurring because the video player is trying to use a script that doesn’t play well with Internet Explorer.

Several users encountering the same issue have managed to fix the problem indefinitely by accessing the Internet Options settings of Internet Explorer an adding the culprit script to the Restricted sites list. Here’s a quick guide on how to do this:

  1. Press Windows key + R to open up a Run dialog box. Then, type “control” and press Enter to open up the classic Control Panel interface.
  2. Inside Control Panel, use the search function (top-right) corner to search for ‘internet options‘. Then, click on Internet Options from the list of results.
  3. Inside the Internet Properties screen, click on the Security tab.
  4. From the four security settings, select Restricted sites and then click on the Sites button below.
  5. In the Restricted sites box, type the following web address to the box under Add this website to the zone and click on Add:
    http://www.google-analytics.com/ga.js
  6. Click Close and then click on Apply to save the current configuration and restart your computer.
  7. At the next computer startup, launch another video with KMPlayer and see if the error has been resolved.
Adding the Script to the Restriction list
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.