Velocity.exitField()
Overview
Exits a field scope based on code running in the web view.
Added in version 1.2.109
Only available in the Web View engine context. For more information, see Velocity Scripting APIs.
Use Cases
To change the field scope when the focus changes in the web view.
Format
Velocity.exitField(fieldName);
Parameter | Description | Type | Required |
---|---|---|---|
fieldName | The name of the field scope to exit. | String | Required |
Example 1
Copy
/* Exit @/path/test.html/field1 scope if an element with the id of field1 is not found.
*/
View.evaluateJavascript(
"if(!document.getElementById('field1')) {" +
" Velocity.exitField('field1');" +
"}"
);