ACTIVATE HTMLCONTROL


10.0A, PLBCMP GUI Only

 

The ACTIVATE HTMLCONTROL statement makes a HTMLCONTROL visible and allows the user to interact with it. An optional execution label may be provided to process information if the user selects the HTMLCONTROL. The instruction uses the following format:

 

 

[label]

ACTIVATE

{htmlctl}[,{routine},{result}]

 

Where:

label

Optional. A Program Execution Label.

htmlctl

Required. The name of a previously created HTMLCONTROL object variable or a pointer to a HTMLCONTROL object.

routine

Optional. A program execution label called when an event occurs within the screen boundaries of the object.

result

Optional. A previously defined Numeric Variable whose value is always zero.

Flags Affected: NONE

Note the following:

  1. The runtime performs the action of registering the $jQueryEvent. See EVENTREGISTER for more information on $jQueryEvent. Also, the {routine} for this ACTIVATE and the {routine} for the EVENTREGISTER of the $jQueryEvent for this HTMLCONTROL are mutually exclusive. The means that the last {routine} registered for the $jQueryEvent of the HTMLCONTROL becomes the active {routine} which is used.

  2. If the {result} operand is specified, it is set to a value of zero.

  3. If the {result} operand is too small to contain the value, the OVER flag is set upon entry to the {routine}. This flag setting does not occur at the time of the ACTIVATE but at the time the {routine} is called.

  4. The {routine} is called when an event is produced by a HTML element that exists in the HTMLCONTROL object.

  5. The {routine} is called as if a CALL instruction was performed. It is only called when an EVENTCHECK or EVENTWAIT is executed.

  6. When the {routine} is complete, a RETURN instruction continues execution at the instruction following the EVENTWAIT or EVENTCHECK. Otherwise, a NORETURN instruction should be executed to clear the return address from the call stack.

  7. If the HTMLCONTROL specified by an ACTIVATE instruction is already active, the old {routine} and {result} operands are replaced with the new {routine} and {result} operands.

  8. An object must be CREATEd before it is activated. If this is not done, a runtime error of O105 is generated.

  9. If insufficient memory is available to perform the operation, a runtime error O106 is generated.

  10. If a FILEPI instruction is active, it is terminated.

  11. When the {routine} is invoked, the EVENTINFO instruction retrieves additional data related to the $jQueryEvent..

 

 

See Also: Example Code, ACTIVATE, DEACTIVATE, Object Output Instructions



PL/B Language Reference