Java is one of the most common andthe most actively developing programming languages, on the basis of which most websites and applications today operate. Javascript scripting language is used to ensure that the content of websites is displayed correctly in the browser, as it was designed by the site's creator. If any text elements, images or elements of the site structure were displayed correctly in the browser, the Javascript function should be enabled in it. Below we will talk about how to enable Java script, if the code is written correctly.


To fix the problem, you must first find it. The following are the main errors that may prevent the script from running:

  • Conflict with the browser. Typically, the code is written for the most common browsers and sometimes the developer does not take into account its correct display in unpopular web-programs.
  • The script does not match the site builder. The problem is similar to the previous one. The script can be written for the most common CMS, not taking into account the nuances of some free engines, such as WordPress, Ucoz, etc., which use their own programming languages ​​that conflict with the conventional code.
  • Incorrect file upload to server. By the FTP protocol, there are three options for uploading a script to the hosting: auto-detection, text and binary. Many often do not pay attention to this step, because of what the script does not function correctly.
  • The script handler is not connected. It's not enough just to upload the file to the hosting, you must also specify the handler function, specifying the script, what action it should respond to. Typically, this function is specified within the <body> ... </ body> tags, telling which event the script should react to. For example: <input type = "button" onclick = "helloworld ()" value = "Hello world!" />.
  • No additional libraries forprocessing the script. Before you enable the JS script, you need to make sure that the most common library is used to develop the jQuery script.
  • Script processing is not allowed by the browser. The problem is solved quite simply - by connecting this function in the browser settings.

Connecting the jQuery library

Let's take a look at the Java language example of a script, how to enable the jQuery library, so that the necessary processing of scripts can work:

  1. Download the latest version of jQuery from the official site;
  2. Download via FTP-protocol library in the appropriate directory (javascript) of your site. If it is missing for some reason - create it;
  3. Connect the library by typing the line in the head block: <script type = "text / javascript" src = "javascript / library file name.js"> </ script>

Enable browser settings

A fairly common cause of the incorrectThe work of the script is to disable its processing in the browser. Below is the instruction to enable this setting on an example of the popular Google Chrome browser:

  1. Open the Google Chrome Settings and Controls menu.
  2. Select Settings.
  3. Turn on the demonstration of advanced settings.
  4. In Personal Data, click Content Settings.
  5. Find the JavaScript section and allow this script to be used on all websites.
  6. Exit browser settings and update the page that you did not previously open with JavaScript.

You can also benefit from the How to Run the Script article.

Comments 0