15 the onsessionswitch event, Syntax, Example – Casio Naurtech CETerm Ver.5.5 Scripting Guide User Manual
Page 96: 16 the onstylusdown event

N
AURTECH
W
EB
B
ROWSER AND
T
ERMINAL
E
MULATION FOR
W
INDOWS
CE
AND
W
INDOWS
M
OBILE
CETerm Scripting Guide
Page 96
4.15
T
HE
O
N
S
ESSION
S
WITCH
E
VENT
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
T
HE
O
N
S
TYLUS
D
OWN
E
VENT
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.