subscribe( ) method (JSDO class)
- Last Updated: March 30, 2020
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
Subscribes a given event callback function to a named event of the current JSDO or table reference.
For more information on these events, see the reference entry for progress.data.JSDO class.
Return type: null
Applies to: progress.data.JSDO class, table reference property (JSDO class)
Syntax
|
- jsdo-ref
- A reference to the JSDO. If you call the method on jsdo-ref, you can subscribe the event handler to any event that fires on the JSDO and all its table references.
- table-ref
- A table reference on the JSDO. If you call the method on table-ref, you can subscribe the event handler to an event that fires only on the table reference.
- event-name
- A
stringthat specifies the name of an event to which you subscribe an event handler. See the reference entry for progress.data.JSDO class for a list of available JSDO events. - op-name
- A
stringthat specifies the name of a JSDO invocation method, a call to which causes the event to fire. This parameter is required in cases where event-name isbeforeInvokeorafterInvoke. Use it only with these event names, and only when subscribing on the JSDO (not on a table-ref). The value ofop-nameis the same as thefnNameproperty on the request object. - event-handler
- A reference to an event handler function that is called when the specified event fires.
- scope
- An optional object reference that defines the execution scope of the event handler
function called when the event fires. If the
scopeproperty is omitted, the execution scope is the global object (usually the browser or device window).
See also:
invocation method, progress.data.JSDO class, unsubscribe( ) method (JSDO class)