Definition of a JavaScript function

With this command you can define a JavaScript function. This is the first step to define a JavaScript function.

  1. In the JavaScript tab, click on the Define a script button.

  2. In the text box Function name, type the name of the JavaScript function.

  3. In the text box File Source, define the file you want to use.
    The file has the .ja extension.

  4. From the Language dropdown list, select the appropriate script version.

  5. Please note that the Insertion of the functions in the document header is active, or the JavaScript command will not be valid.

  6. Click on the OK button.

CuteHTML Pro will insert the following lines of code in the header section of your document:

<script language="JavaScript">
<!-- begin script
 
function aName() {

 }

// -->
</script>

 

Once you have indicated the JavaScript function, you can insert the function contents with the help of the menu JavaScript commands summary. For more information on each of the JavaScript commands, please refer to the JavaScript reference in CuteHTML Pro’s Help menu.