An action has an optional target (specified as a separate attribute). The target is what the action "works on", e.g., it identifies the field which should be disabled.
A sequence of actions can be performed by specifying more than one action as an attribute value, with the actions separated by semicolons. Multiple targets can be specified using the same syntax. Targets are sequentially paired with the actions (so the number of targets and actions should be the same.
For example, the following attributes specify that one field should be disabled while another field should be enabled:
"action:UNLOCKED;LOCKED", "target:form1:text2;form1:text3"
<hx:behavior event="onclick" behaviorAction="hide;nothing" actionTarget="div1" />
Action |
Target |
Result |
Description |
---|---|---|---|
GOTO |
url('value') |
true |
Goes to the specified page. Note the syntax of the target. |
LOCKED |
id |
true |
Disable the specified tag. Disables all tags within the tag if it is a container (for example, a div).Disable the specified tag. Disables all tags within the tag if it is a container (for example, a div). |
UNLOCKED |
id |
true |
Enable the specified tag. Enables all tags within the tag if it is a container (for example, a div). |
INVERTLOCKED |
id |
true |
Inverts the disabled state of the specified tag. Sets all tags within the tag to the same state if the tag is a container. |
SHOW |
id |
true |
Shows the specified tag. |
HIDE |
id |
true |
Hides the specified tag. |
INVERTHIDE |
id |
true |
Inverts the display of the specified tag. |
VISIBLE |
id |
true |
Makes the specified tag visible. |
INVISIBLE |
id |
true |
Makes the specified tag invisible.
Note: When a tag is
hidden, it cannot be seen and it occupies no space. When a tag is invisible,
it cannot be seen but it occupies space (that is, the tag is there, it's just
that none of it's pixels are drawing.
|
INVERTVISIBLE |
id |
true |
Inverts the visibility of the specified tag. |
NEXTTAB |
id |
true |
Advance to the next control in the tab order relative to the specified ID. |
NEXTTABCLEAR |
id |
true |
Clear (delete) characters in the field from the cursor position to the end of the field, and then advance to the next control in the tab order relative to the specified ID. |
PREVTAB |
id |
true |
Advance to the previous control in the tab order relative to the specified ID. |
PREVTABCLEAR |
id |
true |
Clear (delete) characters in the field from the cursor position to the end of the field, and then advance to the previous control in the tab order relative to the specified ID. |
CLICK |
id |
false |
"click" the control identified by the specified ID. |
SUBMIT |
id |
false |
Submit a form using the specified ID. The ID can be any field in the form or of the form itself. If the ID identifies a submit button, that button is used to submit the form. If the ID identifies any other tag in the form or the form itself, the first submit button in the form is used to do the submit. The submit is done using the submit button (i.e., not doing a form.submit()) so that the onsubmit handler for the form will fire. |
FOCUS |
id |
false |
Sets focus to the specified tag. The content of the field receiving focus may/may not be selected depending on the browser. |
SELECTED |
id |
false |
Sets focus to the specified tag and selects the content. |
UNSELECTED |
id |
false |
Sets focus to the specified tag and unselects the content. |
ALERT |
string |
false |
Display an alert message box with the specified string as the message. If the target is set to the special string @ERROR, the (localized) error message in the event object is displayed as the message. |
CONFIRM |
string |
true if OK else false |
Display a "confirm" (ok cancel) message box with the specified string as the message. If the target is set to the special string @ERROR, the (localized) error message in the event object is displayed as the message. |
PADLEFT |
id |
true |
Deprecated. Pads the value of the field identified by the ID with spaces to its maximum length. Padding is done on the left. |
PADRIGHT |
id |
true |
Deprecated. Pads the value of the field identified by the ID with spaces to its maximum length. Padding is done on the right. |
TRIM |
id |
true |
Deprecated. Removes spaces from the left and right of the field identified by the ID. |
NOTHING |
none |
false |
Do nothing (useful with keybind and mousebind as a way of "no-oping" a keystroke or mouseclick). |