Update cookies preferences
Promotic

AddEvent - method of the PmForm object

Description:
Registers a function into the specified event.
Syntax:
Empty AddEvent(String sEventName, String sFuncId, Function Func)
Parameters:
sEventName(String) Event name.
"onOpen" - The event is triggered when 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 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 (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.
Note:
This method is also functional in Web panels.
This method is functional only for JavaScript language.
See also:
Example1:
JavaScriptSelect and copy to clipboard

function onTest(ev)
{
// ...
}
oForm.AddEvent("onEditAccept", "edit1", onTest);
Example2:
See examples in events PmfButton.onAction, onEditAccept etc.

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

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