ALP ScriptGen raw scripts
Raw scripts are plain scripts written in a particular Active Scripting language. They share the same object model as the ASP-like scripts. Raw scripts are not parsed as a "text with embedded scripts" thus the output of such kind of script is only the output made through explicit calls to the Response.Write or Response.BinaryWrite methods. If a complex HTML output is required Raw scripts can still be used by implementing some kind of template functionality (see Survey example samples\scriptgen\inquiry directory).

Raw scripts do not allow includes but they have an alternative - library files. these are script files written in the same language included before the processed script. Files are defined in the local alp.application file. Here is a sample section for raw scripts written in JScript (section is from the alp.application used in the survey example):

        { js-script: (CG.newObjects.ScriptGen)
        } js-script;

The above section assumes that in the default alp.application there is a section for the js-script extension and other required parameters are inherited. If defining your extension full section will be required - like this:

        { js-script: (CG.newObjects.ScriptGen)
        } js-script;

Raw scripts have specific record entries recognized by the ScriptGen content generator:

(string)Library - specifies the paths to the scripts to be included. If the value does not begin with "\" path is relative to the script executed. If the path begins with "\" it is relative to the site root. Library scripts are included in the order found in the configuration.


One little "Hello world" script will be:

Response.Write("<H1>Hello World from the raw scripts</H4>");

See also: ScriptGen objects, ScriptGen configuration

newObjects Copyright 2001-2006 newObjects [ ]