Setting event return codes

The event return codes documented for DataWindow events are also valid for the Web ActiveX. However, JScript does not support return values for events. Instead, to specify a return code, you call the SetActionCode method as the last line in the event script.

For example, the return code of the onItemError event allows you to determine what happens when user-entered data fails a validation rule. By specifying a return code of 3, you cause the Web ActiveX to reject the data but allow focus to change. This statement would be the last line of the onItemError event script:

This.SetActionCode(3);