AddJs Method (CLIENT)
PLB Web Only, 9.9B
The AddJs method loads Javascript code from a file and evaluates\executes custom javascript code that was loaded. This method allows the bulk loading of multiple Javascript functions. Once functions are loaded by AddJs, they can be used\executed using the JsRun method or the API instruction. The method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A CLIENT object.
return
Optional. A Numeric Variable that returns the success or failure of the method.
url
Required. A Character String Variable or string literal that defines the javascript file to be loaded and executed.
Flags Affected: OVER, ZERO
Note the following:
The ZERO flag is always set when the {return} value is zero which indicates that the method execution was successful. The ZERO flag is clear if the {return} value is not zero which indicates that the method execution failed.
The OVER flag is set if the {return} variable is too small to receive the numeric result.
The {return} value of a zero indicates that the method sent the load action request to the client browser.
The {url} string gives a link that allows a custom javascript file to be loaded. The javascript functions can then be referenced using the JsRun method of PL/B CLIENT object.
The {options} value invokes special behaviors for this method as follows:
|
Value |
Meaning |
|
0x1 |
This value causes the method to allow the same javascript file to be reloaded more than once. Otherwise, a subsequent loading of the same javascript file is ignored. |
See Also: CLIENT, Client Methods, Method Syntax
![]() |