Scripting Guide
NAURTECH WEB BROWSER AND TERMINAL EMULATION FOR WINDOWS CE AND WINDOWS MOBILE
CETerm Scripting Guide Page 96
4.15 THE ONSESSIONSWITCH EVENT
The OnSessionSwitch event is fired when the active session changes. The
handler can be used to perform a session specific action.
Syntax
function OnSessionSwitch ( session, previousSession )
session – index of session which became active.
previousSession – index of session which was previously active.
Example
This example will reposition the battery information item depending on which
browser session is active.
/* OnSessionSwitch */
function OnSessionSwitch ( session, previousSession )
{
var b = CETerm.Session( session ).Browser;
if (b.DocLoaded)
{
var x = (session == 1) ? 195 : 10;
var y = (session == 1) ? 10 : 100;
b.AddMetaItem( "Battery", "x=" + x );
b.AddMetaItem( "Battery", "y=" + y );
CETerm.PostIDA( "IDA_INFO_REFRESH", 0 );
}
}
4.16 THE ONSTYLUSDOWN EVENT
The OnStylusDown event is fired when the user taps a terminal emulation
screen with a stylus or finger. This event is only fired if the tap does not activate
a standard “touch” feature. All touch features can be disabled in the CETerm
configuration. This handler can be used to activate user-defined hot-spots.