Other great resources: Official JS API docs, Scripting Forum

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Overview

Enables additional javascript files to be included in your script.

Syntax

include(filename);

Parameters

ParameterTypeMandatoryDescription
filenameString(tick)

The name of the file to include.

(question) If it's in a different folder, include the relative path?

Return value

Oh the joy...

ValueTypeDescription
undefinedUndefined

The file was successfully included.

Note: undefined type-coerces to false in an if statement, which is a pity because false means...

falseBooleanThere was a problem including the file.

Note: The include() function traps any uncaught errors and writes them to the log files, then returns false. So you don't need to wrap this function in a "try ... catch" clause.

Example

Including a file
include("foo.js"); // include foo.js
  • No labels