On this Page

    Scripting

    Most DocOrigin applications use JavaScript to enhance the processing of document data. This scripting capability includes many extensions to the standard JavaScript language through the addition of functions and the pre-definition of certain variables. When run within Merge a document DOM (Document Object Model) exists which allows access to most of the document objects and their properties. Functions that greatly exceed the normal 'reach' of JavaScript include file read/write functions, web access functions, send mail, generic running of any external application, and business charting. Together with all of the other extension features and normal JavaScript logic facilities, this greatly enhances the document generation and processing capabilities of the DocOrigin system.

    DocOrigin has extended the scope of the built-in scripting engine in a number of ways:

    • Many additional functions or object methods have been added to specifically benefit DocOrigin document processing. See the Script Functions section for a list of available objects and functions. 
    • Certain pre-defined variables such as _DEBUG and the $ variables are automatically initialized when the script is run. These variables typically give access to command-line settings in a simple and effective manner. 
    • Additional Merge DOM (Document Object Model) extensions allow direct access to values, settings, and objects within the document template.