Show/Hide Toolbars

Managing an FVTerm Child iFrame in Javascript

Navigation: Advanced Sharing with a Web Service Application

Simple Coordination with the FVTerm Connections

Scroll Prev Top Next More

When the parent frame of the FVTerm iFrame needs to access the same session in a mixed mode, two additional javascript functions need to be setup in the parent frame to help in this coordination.

 

Note: the following variables are pre-defined in the FVTermParent.js file.  You do not need to declare them if you are including FVTermParent.js in your page.

 

Identifying the FVTop Window/iFrame

 

The first requirement is to provide the FVTerm script an identifier so that two function pointers can be defined for use by the parent frame:

 

var FVCtlMarker=true;   // this is for children windows to find FVTop

 

The above line of javascript in the parent frame provides a marker for FVTerm to find the location of the parent window/iFrame for calls and references.

 

Setting the Function References

 

There are two function references that the FVTerm javascript will set for call-backs on initialization/load of the FVTerm iFrame:

 

var fnRestartEmulator=null;

var fnStopEmulator=null;

 

Coordinating with the FVTerm Session

 

When a user action or other event causes a need to make a call from the browser that will interact with the session, use the fnStopEmulator() call to avoid possible conflicts (these can occur if the action occurs just as a background sync call occurs):

 

 if (fnStopEmulator!=null)

         fnStopEmulator();

 

After the call has been made and the FVTerm Session is to be restarted/reconnected, use the fnRestartEmulator call:

 

 if (fnRestartEmulator!=null)

     fnRestartEmulator();