SCRIPT


Scripts offer authors a means to extend HTML documents in highly active and interactive ways. For example:

  • Scripts can be evaluated as a document loads to modify the contents of the document dynamically.
  • Scripts can accompany a form to process input as it is entered. Designers can dynamically fill out parts of a form based on the values of other fields. They can also ensure that input data conforms to predetermined ranges of values, that fields are mutually consistent, etc.
  • Scripts can be triggered by events that affect the document, such as loading, unloading, element focus, mouse movement, etc.
  • Scripts can be linked to form controls (for example, buttons) to produce graphical user interface elements.

In the agent web interface, the SCRIPT tag is mainly used to call Chilli scripts which do most of the internal work within the agent interface. However, the SCRIPT tag can also call other scripts, such as Unix shell scripts or others.

Scripts can be either included into the HTML file if they are only applicable in a specific situation, or they can be stored in separate files. Since most scripts are applicable in more that one situation, those are stored in separate HTML files under the ScriptLib directory. These scripts are called via the BMC Software INCLUDE tag. Depending on the context of the script, its execution can then result in other scripts being executed, in a direct HTML output or an output which is then parsed again before being passed on to the browser.

When encountering a SCRIPT tag in an HTML file, the parser checks the ScriptInterpreters section of the webconsole.ini file for an entry matching the supplied language name. If it does not find a non-blank value, it passes the tag and its contents to the browser without changes. If it finds an entry in the .ini file with a non-blank value, it assumes that the value is the path of the interpreter to be used for handling the script. In this case it copies the text between the <SCRIPT>and </SCRIPT> tags into a temporary file and executes it using the supplied path. The path can be relative (for example, sh.exe /bin/sh

The default value of the language parameter is "Chilli". If the language specified is "Chilli" or the lang parameter is absent, the script tag will treat the value as a Chilli script. If the parameter value is not Chilli or empty, the parser will check the .ini file for the value specified in the lang parameter.

Start Tag

required

End Tag

required

Syntax

<SCRIPT [language='script language'] [vars='variable name(s)'] [parseoutput]></SCRIPT>

Mandatory Parameters

There are no mandatory parameters for this tag.

Optional Additional Parameters

The language parameter defines the program with which the script is to be executed.

The variable parameter vars defines which variables are being used in the script.

If the parseoutput parameter is supplied with the SCRIPT tag, the output after the script was run is parsed again by the parser.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Client Management 12.2