JsRun Method (CLIENT)
PLB Web Only, 9.9B
The JsRun method executes JavaScript at the client browser within the 'plbwebbasic' JavaScript runtime instance. The method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A CLIENT object.
return
Optional. A Character String Variable that returns the result from a JavaScript function that is executed.
javascript
Required. A Character String Variable or string literal contains the JavaScript code to be executed.
Flags Affected: OVER, ZERO
Note the following:
The EOS flag is set TRUE if the JavaScript return variable is to small to receive the JavaScript function result without without being truncated.
The ZERO flag is always cleared.
The OVER flag is always cleared.
The optional {options} bit mask values can change the execution behavior of the JsRun method as follows:
|
Value |
Meaning |
|
0x0 |
The default value which allows JavaScript code to be executed. |
The JsRun method dynamically loads, executes, and returns a result from a JavaScript function executed by the client browser. Also, the JsRun method can execute any previously loaded JavaScript functions that exist in the 'plbwebbasic' runtime instance\scope at the client browser.
Sample JavaScript code to invoke an 'alert' at the client browser followed by the returned string of another JavaScript function named 'PlbApiTest1'.
|
RESDATA |
DIM |
50 |
|
C |
CLIENT |
|
|
nVar |
FORM |
2 |
The JavaScript function 'PlbApiTest1' exists as a sample function found in the c:\sunbelt\plbwebsrv.9xx\http_root\plbwebctls.js' file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See Also: CLIENT, Client Methods, Method Syntax
![]() |