SetEvents Method (HTMLCONTROL)
10.9, PLBCMP GUI Only
The SetEvents method changes the data-plbevent attribute in a HTML element contained in a HTMLCONTROL object. The method sets the data-plbevent attribute in the HTML element that has an id attribute that matches the id parameter. This method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A HTMLCONTROL that is accessed.
return
Optional. A Numeric Variable that always returns zero.
Id
Required. A Character String Variable or literal that contains the HTML element id attribute.
value
Required. A Character String Variable or literal that has zero or more JavaScript event names.
flags
Optional. A Numeric Variable or decimal value that specifies a bit mask value that controls the behavior of this method.
Flags Affected: OVER, ZERO
Note the following:
This method changes the data-plbevent attribute value in a HTML element contained in a HTMLCONTROL object.
The ZERO flag is always set TRUE.
The OVER flag is always set FALSE.
The {id} is a value that determines the HTML element used for data changes. The {id} string is matched against the id attribute of the HTML element.
The {value} string contains zero or more JavaScript event names which must be separated by a whitespace character delimiter. See this URL Link for more information on events:
To receive JavaScript events in the PL/B program the EVENTREGISTER statement must be used to register the $JQueryEvent (event number 200) event for a HTMLCONTROL object.
The {flags} parameter is a bitmask value that forces specialized behaviors for the execution of this method.
The {return} value will always be zero.
Example of SetEvent Method:
For a HTMLCONTROL that contains a HTML element as follows:
This PL/B SetEvent method changes the data-plbevent value using the following instruction:
In this example, the new HTML element is updated as follows:
See Also: HTMLCONTROL Method Syntax
![]() |