Previous Topic: btnStartRowNext Topic: cmdbMetadata


button

The button macro defines a button that a user of a form can click to invoke an action.

This macro has the following properties:

btnType=negative|positive

Specifies whether a button performs a positive action (such as Save) or a negative action (such as Cancel). This specification is for documentation only; specifying a button as positive or negative has no effect on the appearance or use of the button.

Caption=text

(Required) Specifies the text for the label of the button. You can optionally end the caption with a hotkey hint enclosed in square brackets, for example, Caption=”Save[Sv]”. When you provide a hotkey hint, CA Service Desk Manager selects the hotkey for the button from the characters in the hint. When you do not provide a hotkey hint, CA Service Desk Manager selects the hotkey from the characters of the entire caption.

Disabled=true|false

Specifies whether the button is disabled on the initial display. When you do not specify this property, the button is enabled.

EndRow=yes|no

Specifies whether this button is the last of a horizontal row of buttons. If specified as EndRow=yes, CA Service Desk Manager automatically inserts a btnEndRow macro after this button. When you do not specify this property, CA Service Desk Manager does not configure the button as the last one in a row.

Func=string

(Required) Specifies the JavaScript that is invoked when the user of the form clicks the button.

hotkey_name=string

(Required) Specifies the caption for selecting a hotkey. You must specify this property and an ASCII string. CA Service Desk Manager selects the hotkey for the button from the characters in the hotkey_name string. The hotkey_name macro is ignored in locales using the Latin alphabet; these locales always use the Caption to determine a hotkey.

ID=string

(Required) Specifies a JavaScript identifier for the button.

NewRow=yes|no

Specifies whether this button is the first of a horizontal row of buttons. When you specify NewRow=yes, the product automatically inserts a btnStartRow macro before this button. When you do not specify this property, the product does not configure the button as the first one in a row.

tabIndex=n|-1

Specifies the HTML tabIndex for the button. TabIndex is meaningful only in relation to other HTML elements on the form with a tabIndex. A user of the form tabs from element to element in sequence by the tabIndex values of the element. When you do not specify this property, the button receives a default tabIndex.

Tooltip=string

Specifies the tooltip text for the button. When you do not specify this property, the property defaults to the button caption.

Width=0|number

Specifies the width of the button in pixels. If you omit this property or specify it as 0, the product creates the button exactly wide enough for its caption.