# Custom JavaScript Types and Classes

Note: Tags of type Cjs* are not supported. These tags are only supported in JavaScript scripts.

The following types and classes can be used with the WebPage scripts:

- CjsColor

  This is a class that is used to represent an ARGB color value.

  There are four member variables:

  - A - Alpha
  - R - Red
  - G - Green
  - B - Blue

  The constructor accepts parameters in the above listed order; which, as shown in the following example, results in a CjsColor Red color:

      var color = new CjsColor(255, 255, 0, 0)

- CjsDateTime

  This type holds a standard JavaScript object, and has two properties and classes.

  Properties:

  - DateObject - Returns the JavaScript date object.

  - ISOString - Returns the date as an ISO 8061 string.

    Note: For more information about the ISO 8061 standard (requires internet access).

  Constructors:

  - CjsDateTime(date: string) - Creates a CjsDateTime object from a datetime string, based on the ISO 8061 standard.
  - CjsDateTime(date: Date) - Creates a CjsDateTime object from a standard JavaScript date object.

- CjsViewRotationAngle

  This is an enum:

      enum CjsViewRotationAngle {
          Clockwise0 = 0,
          Clockwise90 = 1,
          Clockwise180 = 2,
          Clockwise270 = 3
      }

- CjsZoomType

  This is an enum:

      enum CjsZoomType {
          Manual = 0,
          Fit = 1,
          Fill = 2
      }

- TableData

  This is an object that holds data for DataTable, ListBox and SelectionBox Web Page User Input Controls elements, and it has two properties and one constructor.

  Properties:

  - Header - A string array, containing the header text.
  - Data - A 2D array of strings that contain the text of the TableData.

  The constructor accepts the properties in the following order:

      var a = new TableData([“Header1”], [[“Row1”], [“Row2”], [“Row3”]])