webtrigger onBlur

This web trigger is used to program behavior when the DSP widget loses focus.

Declaration:
webtriggeronBlur
Optional scope block
Optional variables block
javascript
Javascript to implement the client-side trigger
endjavascript
end
Parameters: None
Applies to: This trigger is applicable only on HTML-based DSP widgets that can get and lose focus.
Activation: Activated when the DSP widget loses focus.
Default behavior: None
Behavior upon completion: None

Description

If defined, the onBlur trigger is fired when the user tabs or clicks away from a field in a DSP. It can be used to reverse the effects applied by the onFocus trigger.

Using OnBlur

In the following example, the trigger prevents the user from moving to another field if the entered data in the field incorrectly.

; On ID field
webtrigger OnBlur
   scope
output
endscope
javascript
    //
    if (this.getError() !== null) {
        this.focus();
    }
endjavascript
end

Related Topics