Show/Hide Toolbars

Inventu FVTerm Web Terminal Emulation Help

A number of provided javascript callbacks (events) and functions are provide to enable read/write of the screen as well as being able to enter a single screen transition's worth of keystrokes.

 

The provided callback event functions are:

 

SCOnLoad(em)Called each time a new screen or screen update is received from the Inventu Viewer server  / host.  Use a set of IF statements to determine the active screen and read and write the screen accordingly.  The em parameter is a handle to the active emulation object and is required for any access to the emulation screen.

 

SCOnSend(em,key)Called each time a screen is submitted based on a user pressing an ENTER, Function or other "AID" key.  The em parameter is a handle to the active emulation object and is used for any access.  The key parameter contains the current keystroke in mnemonic form ([enter], [pf1], [pf2] and so on).
 
Return true to indicate that the send should complete; return false to cancel the send which can be used as part of a client-side validation routine for entry data.

 

SCOnResize(em)Called each time the emulation browser frame is resized.  If any content has been positioned on the screen, you can use this event to relocate the content.  The values em.chrW and em.chrH provide the active emulation screen character Width and character Height, respectively.  When using absolute positioning, the top of row one generally starts at a posOffset of 6px, but you may need some experimentation when locating content depending on the hosting iFrame definition.

 

The provided screen read/write functions are:

 

SCScreenVal(em,row,col,len)Returns a text value from the active screen.  Area must be standard output (protected) text and not an INPUT (unprotected) field.  To read an INPUT field, use the SCGetField function.

 

emThe object passed in the SCOnLoad or SCOnSend call.
rowThe row of the text to read.
colThe column of the text to read
lenThe length of the text to read.

 

SCScreenVal(em,offset,len)Overload of the same function using row,col,len but using offset instead of row,col.

 

emThe object passed in the SCOnLoad or SCOnSend call.
offsetThe zero-based offset of the location into the screen of the text.
lenThe length of the text to read.

 

SCGetField(em,row,col)Returns a text value from the active screen.  Area must be a INPUT (unprotected) field.  To read a protected (standard) text area SCScreenVal function.

 

emThe object passed in the SCOnLoad or SCOnSend call.
rowThe row of the field to read.
colThe column of the text to read

 

SCGetField(em,offset)Returns a text value from the active screen.  Overload of the same function but using zero-based offset instead of row,col to identify the field to read.

 

emThe object passed in the SCOnLoad or SCOnSend call.
offsetThe zero-based offset of the location into the screen of the field.

 

SCSetField(em,row,col,val)Sets a text value on the active screen.  Area must be a INPUT (unprotected) field.  You cannot set a value unless it is an unprotected field.

 

emThe object passed in the SCOnLoad or SCOnSend call.
rowThe row of the field to write.
colThe column of the text to write
valThe new text value for the field.

 

SCSetField(em,offset,val)Sets a text value on the active screen.  Overload of the same function but using zero-based offset instead of row, col to identify the field to write.

 

emThe object passed in the SCOnLoad or SCOnSend call.
offsetThe zero-based offset of the location into the screen of the field.
valThe new text value for the field.

 

SendAid(key)Sends the currently selected emulation screen to the host using the provided key as the "enter" or AID key.

 

keyThe AID key in mnemonic form, such as [enter], [pf1], [pf2] and so on.