Show/Hide Toolbars

Managing an FVTerm Child iFrame in Javascript

The FVMsgApi.ConnectMsgFVTerm Factory Function will construct a new FVAPISession object and save it in the sessions[] array, part of the Window global space.

 

For users of the FVTermParent module, the ConnectFVTerm Factory function will create an FVTermSession object and set it to the defined variable fvTermSession that is in the window global space.

 

It will also initialize an iFrame with a provided ID to be an FVTerm application iFrame.  This supports connecting to an existing session using that session's SessionID, as well as setting a host and/or autostart options.

 

It will then wait for the FVTerm session to be ready and call back a function when that is true.

 

Parameter

Description

frameID

HTML id of an iFrame that will host the FVTerm web application.  If null, defaults to "FVTerm".

pageUri

URI to the FVTerm application, which must be on the same server and port (or you will need to fiddle the document.domain) to avoid cross-site scripting security exceptions.  If null, defaults to "/FVTerm/SCTerm.html"

options

A javascript object with additional options or null if none.  Option values include:

 

application

The application name to associate with the session--this must correlate to an entry in the web.config and match an application name specified there.

sessionKey

The sessionKey of an already existing session.  If this option is provided, the FVTerm child frame will be activated with the existing session current screen displayed.

hostName

NOTE: This property is not recommended if Profiles mode is in effect or the settings for a profile will not be properly initialized--use the profile property).

 

If no sessionKey is provided, the host name to connect to can be specified.  If not provided, the last host connected by the user's browser or the default host for the Inventu Viewer+  FVTerm application will be connected to.

hideClose

Set true and when a session is closed, the user will not see or need to interact with the notice and the browser will either go to the home screen or close if configured for the Profile.

profile

When Profiles are active this is the name of the profile to connect to--replaces hostName.

view

When Profiles are active, this is the view that will be loaded to set behaviors--default is "top"...when user closes the session, the profiles for this view will be displayed.

autoStart

If set to true the displayed session will autostart, which may be needed if the user has the menu display or if the menu display is the default.  Note that if hostName is specified, the autostart option will be set true automatically.

keepAliveOnClose

If set to true the started session will not be terminated when the browser or iFrame is closed or the user navigates away from the FVTerm application.  Default is false.

userID

If a value is provided, on startup of the FVTerm session the active user will be set to this value. This is available to server-side API code as well as displayed in the Admin Console session information.

userLocation

If set to a string, such as an IP Address, when the connection is made, the value passed will be used as the user's location.  This is useful in some UNIX/LINUX environments that use the user's IP address.

restart

For a second initialization of the same iframe, this option can improve the reliability of the initialization. Note supported for the msgAPI mode.

version

Set to a unique value like Math.random() to ensure your browser doesn't cache the request and you get a new session (when restarting).

connectTo

Full customization for a dynamic connection--will not have any profile customization if profiles are active--creates a unique connection.  Following sub-properties for connectTo are as follows:

hostName - base host definition

ipAddress - IP or DNS for host connection

port - Telnet port to connect to

connection - ssh, tnvt, tn3270 or tn5250

termType - Terminal type (like VT220)

termID

The ID if using the FVSessions session management module.  Examples include "A", "B" and so on.

 

fnReady(fvApi, sessionKey)

Required completion function parameter that is called when the FVTerm environment is ready (note that with the msgAPI mode this occurs when the first screen is displayed, but with the original non-msg implementation this doesn't mean the first screen is displayed) - The new FVTerm fvApi Session object and sessionKey / Connect Error Message.

 

The fvApi Object is a FVAPISession for msgAPI mode and FVTermSession for original FVTermParent mode.

 

If the fvApi argument is null / undefined, the connection failed and the sessionKey will contain the connection error message.

 

Return Value

Description

none