How to Fix a JavaScript Error

By Jim Campbell

JavaScript errors are denoted by a small yellow icon in your Internet Explorer browser. When you double-click the icon, the browser displays the errors. Errors occur from syntax mistakes in the code, or if the user has scripts blocked on the browser. You must check these two issues to ensure the JavaScript code runs on the computer.

Step 1

Open the Web page in Internet Explorer. When the error occurs, a yellow icon displays in the bottom status bar. Double-click the icon to review the line of code that is causing the error. Internet Explorer also displays the line number where the error message is triggered.

Step 2

Right-click the HTML or JS page that contains your JavaScript function. Click "Open With," then click your HTML or JS editor.

Step 3

Scroll down to the line number listed in the Internet Explorer error window. You must identify the JS syntax error to fix the coding. For instance, if you are missing a closing or opening bracket, the JS engine displays an error and you must add these characters to stop the errors.

Step 4

Click the browser's "Tools" menu and click "Internet Options" in the list of options. Click the "Security" tab at the top of the resulting window.

Step 5

Click "Custom Level" to open the security options. Click "Enable" for "Active Scripting" in the "Scripting" section. Click "OK" to save the settings. This option stops JavaScript errors caused by security in the browser.