connectPresentationSpace
The connectPresentationSpace function establishes a connection between your hllapi.js application program and the host presentation space.
| 3270 | 5250 |
|---|---|
| Yes | Yes |
Prerequisite Calls
There are no prerequisite calls for this function.
Call Parameters
| Parameter name | Explanation |
|---|---|
| psId | 1-character short name of the host presentation space. |
| success | A callback function that takes one parameter (the _jsro object) and is called upon successful connection with the host Presentation Space. |
| failure | A callback function that takes one data parameter and is called upon a failed connection attempt |
| disconnect | A callback function that takes one data parameter and is called upon a disconnection event. |
Return Value
This function always returns 0.
Remarks
-
This function is equivalent to HLLAPI Function Number 1.
-
An
hllpapi.jsweb application cannot be connected to multiple presentation spaces concurrently. Calls requiring theconnectPresentationSpacefunction as a prerequisite use the currently connected presentation space. For example, if an application is connected to presentation space A, B, and C in that order, the application must connect to B or A again to issue functions. -
Each process that requests a
connectPresentationSpacemust have a correspondingdisconnectPresentationSpace. -
More than one
hllapi.jsapplication can share a presentation space, if the applications support sharing (that is, if they were developed to work together and if they exhibit predictable behavior).