Events

The EditField HTC supports the following events:

  • OnBrowse

  • OnChange

  • OnError

  • OnRequire

  • OnValid

OnBrowse

The OnBrowse event fires when the Browse button to the right of the input box is clicked. The Browse button will only be enabled and visible if browsing has been enabled by setting one of the two attributes onbrowse or browse.

The event object property window.event.value contains the current value of the EditField HTC.

Though any of the EditField types may be configured to have a Browse button and whatever custom browse functionality is appropriate, it is far more common to associate Browse buttons with some EditField types than with others. For example, a Boolean field is unlikely to need a Browse button.

Return to top

OnChange

The OnChange event fires whenever the value in the EditField HTC changes and loses focus. This event does not fire when the EditField HTC is disabled.

Return to top

OnError

The OnError event fires when the EditField HTC encounters a developer error condition. In addition, if the m_bDebug variable in the EditField HTC is set to True, an alert box appears. This switch can be very helpful in debugging problems that occur if you get the error message "The control could not load."

The event object property window.event.error contains a string with details about the error.

Return to top

OnRequire

The OnRequire event fires whenever the EditField HTC changes from required to not required, or from not required to required.

The event object property window.event.required is set to True if the EditField HTC is configured as required and is empty. Otherwise it is set to False. This event does not fire when the EditField HTC is hidden by setting the display style property to "none".

Return to top

OnValid

The OnValid event fires whenever the EditField HTC changes from valid to not valid, or from not valid to valid.

The event object property window.event.valid is set to True if the value in the EditField HTC is valid. Otherwise it is set to False. This event does not fire when the EditField HTC is hidden by setting the display style property to "none".

Return to top


All rights reserved.