ssCore.Script.loadCode

Load code into a script module from a file.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

module - The name of a script module.

path - [Optional] - The name of a fully qualified file name that contains the script code to be added to the module. This parameter supports monikers.

resource - [Optional] - The name of a resource from the layout that contains the script code to be loaded. When a resource is specified it will override the path argument.


Output Parameters:

scriptError - String containing details of a syntax error caught by the interpreter when loading your code. You should not attempt to execute code with syntax errors in it.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.Script.loadCode( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.Script.loadCode( paramsObject );


Notes:

None.


Examples:

ssCore.Script.loadCode({module:"MyModule", path:"startdir://file.js"});