Update cookies preferences
Promotic

AddEvent - method of the PmgObject object

Description:
Registers a function into the specified event.
Syntax:
Empty AddEvent(String sEventName, String sFuncId, Function Func)
Parameters:
sEventName(String) Event name of the Pmg object.
sFuncId(String) Identifier of registered event function.
- Allows removal of the function by the RemoveEvent method.
- Prevents duplicate registering of the same function.
- May contain any characters (this is not a system name).
- Must not be an empty string.
- It is recommended to use e.g. the whole path to the Pmg object.
Func(Function) The event function will be called when the event is triggered.
ev: It has no properties so far.
Note:
This method is also functional in Web panels.
This method is functional only for JavaScript language.
See also:
Example:
Registration of the Test function into the onButtonUp event of the PmgButton object
JavaScriptSelect and copy to clipboard

function Test(ev)
{
Pm.Debug("AddEvent onButtonUp");
}

pMe.Items("/Butt").AddEvent("onButtonUp", pMe.GetPathName(), Test);

History:
Pm9.00.16: Created
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.