AddEvent - method of the PmForm object

Registers a function into selected event.
Empty AddEvent(String sEventName, String sFuncId, Function Func)
sEventName(String) Event name.
"onOpen": The event is triggered on opening the PmForm. All initial sizes and positions of all Pmf objects are already evaluated at this moment.
"onClose": The event is triggered on closing the PmForm
sFuncId(String) Identifier of registered event function.
- allows removal of function by the RemoveEvent method
- prevents duplicate registering of the same function
- may contain any characters (this is not a system name)
- it is recommended to use e.g. the whole path to Pmg object (if this method is called in the event of the Pmg object)
Func(Function) The event function will be called when the event is triggered.
ev: It has no properties so far.
This method is also functional in Web panels.

This method is functional only for JavaScript language.
See also:
JavaScriptSelect and copy to clipboard

oForm.AddEvent("onEditAccept", "edit1", function(ev) { Pm.Debug("AddEvent"); });
JavaScriptSelect and copy to clipboard

oForm.AddEvent("onEditAccept", "edit1", Test);

function Test(ev)
See examples in events PmfButton.onAction, onEditAccept etc.

Pm9.00.07: Created
PROMOTIC 9.0.16 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice