UpdateEvents Method (HTMLCONTROL)


10.0A, PLBCMP GUI Only

 

The UpdateEvents method scans the HTML data contained in a HTMLCONTROL and processes all data-plbevent, data-plbenable, and data-plbtabid attributes. This method uses the following format:

 

[label]

{object}.UpdateEvents

[GIVING {return}][USING [*Flags=]{flags}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A HTMLCONTROL that has been created.

return

Optional. A Numeric Variable that always returns zero.

flags

Optional. A Numeric Variable or decimal number that specifies a bit mask value that controls the behavior of this method.

Flags Affected: OVER, ZERO

Note the following:

  1. This method changes the keyboard focus to a HTML element contained in a HTMLCONTROL object.

  2. The ZERO flag is always set TRUE.

  3. The OVER flag is always set FALSE.

  4. This method scans the HTML data contained in a HTMLCONTROL and processes all data-plbevent, data-plbenable, and data-plbtabid attributes. This should be done after dynamically changing the HTML data for these attributes using the SetAttr method.

  5. The {flags} parameter is a bitmask value that forces specialized behaviors for the execution of this method.

  6. The {return} value will always be zero.

Examples of UpdateEvents Method:

 

  1. This example shows how to add new HTML element can be added to a HTMLCONTROL webpage using the pre-defined 'html' attribute.

  2.  

         HtmlControl.SetAttr Using *ID="myDiv", *NAME= "html",*VALUE="<h2 id='hi' data-plbevent='click'>Hi</h2>"

         HtmlControl.UpdateEvents

     

    In this example, the a new <h2> HTML object is inserted into the myDiv HTML object. This new <h2> HTML Object has a data-plbevent attribute with a click event. The UpdateEvents method will cause the data-plbevent attribute to be processed.

     

  3. This example shows hows to change 'data-plbevent' attribute for the id='hi' HTML element can be changed.

  4.  

         HtmlControl.SetAttr Using *ID="hi", *NAME="data-plbevent",*VALUE="click focus"

         HtmlControl.UpdateEvents //Update the HTML events!

     

    In this example, the <h2> HTML object attribute named 'data-plbevent' is changed to include both the 'click' and 'focus' events. The UpdateEvents method processes and updates the 'data-plbevent'.

 

 

See Also: HTMLControl Methods, Method Syntax



PL/B Language Reference SetCss Method (HTMLCONTROL)