JavaScript

JavaScript: Enabling

JavaScript: Enabling

JavaScript’s high compatibility with modern-day browsers plays a very important role in the popularity of the language. The browsers have built-in support for JavaScript. When programming using JavaScript, you have to enable this support manually in the browser, and the support can be disabled later. 

Following are the steps mentioned to enable and disable JavaScript support in modern-day browsers such as Chrome, Opera, Firefox, and Internet Explorer. 

Chrome Browser

Steps to enable JavaScript support in the Chrome browser:

Step 1: Open your Chrome browser.

Step 2: Click on the Chrome menu in the top right corner of your browser.

Step 3: In the drop-down of the Chrome menu, select the settings option.

Step 4: When the settings window opens, go to the end of the window and click on the Show advanced settings option. 

Step 5: Search under the Privacy section for the Content settings option and select it. 

Step 6: Now, under the Javascript section, you can either select the "Do not allow any site to run JavaScript" option or the "Allow all sites to run JavaScript (recommended)" option, depending upon your

Opera Browser

Steps to enable JavaScript support in the Opera browser:

Step 1: Open your Opera browser.

Step 2: In the Opera menu, click on the Tools option.

Step 3: In the dialog box, opt for the Advanced option. 

Step 4: Search for the content option in the listed items and select it.

Step 5: In the checkbox for JavaScript, select the Enable option. (If you want to disable the JavaScript option in the Opera browser, the Enable option in the JavaScript checkbox should not be enabled.)

Step 6: When completing all the steps, click on the ok option and close the setting window. 

Firefox

Step 1: Open your Firefox browser.

Step 2: Open a new tab in your browser. 

Step 3: In the address bar of the new tab, type about: config.

Step 4: A warning dialog will pop up on the screen. Select the I’ll be careful, I promise! Option. 

Step 5: In the browser, many configure options will be displayed.

Step 6: To search the javascript.enabled option, easily type it in the search bar.

Step 7: You can use the toggle option to enable or disable the JavaScript support; right-click on the option to use it for enabling or disabling. When the value of the javascript.enabled is true, then after pressing the toggle it changes to false and when the javascript support is disabled then the value converts to true after pressing the toggle. 

Internet Explorer Browser

Steps to enable JavaScript support in the Internet Explorer browser:

Step 1: Open the Internet Explorer browser.

Step 2: In the Internet Explorer menu, click on the Tools option.

Step 3: In the dialog box, opt for the Security option.

Step 4: Search for the Custom Level button and click on it. 

Step 5: Search for the Scripting option by scrolling down the page and clicking on it.

Step 6: Under the Active scripting option, click the Enable radio button. (If you want to disable the JavaScript support, select the Disable button under the Active scripting option.)

Step 7: After following all the steps, click ok. 

Browsers that don't support JavaScript 

When JavaScript does not support the browser, a warning can be generated for the user trying to use JavaScript on a browser that either doesn’t support JavaScript or the JavaScript support is disabled. Warnings such as <noscript> tags can be displayed on the screen. 

This can be done by adding a NoScript block just after the script block.

<html>
   <body>
      <script language = "javascript" type = "text/javascript">
         <!--
            document.write("This is my first attempt.")
         //-->
      </script>
      <noscript>
        JavaScript is either not supported or disabled. Please recheck your browser compatibility with JavaScript or confirm the enabling options in the browser settings.
      </noscript>      
   </body>
</html>

The message in the NoScript tag will be displayed on the screen if the browser is not compatible with JavaScript or if the JavaScript support options are disabled.