Casio Naurtech CETerm Ver.5.1 Web Browser Programming Manual User Manual

Page 14

Advertising
background image

N

AURTECH

W

EB

B

ROWSER

S

MART

C

LIENTS FOR

W

INDOWS

CE .NET / P

OCKET

PC




Web Browser Programming Guide

Page 14


The following example uses the ActiveX CEBrowseX control to sound a tone.

<html>
<head>
<meta http-equiv="OnKey0x31" content="javascript:mybeep();"><! 1>
</head>
<body>
<object id="CEBrowseX" classid="clsid:D14943BD-4900-453E-8582-
725F21A57E0C" height=0, width=0></object>
<a href="Javascript:mybeep();">Tap me or press 1 for beep</a><br>
...
<script language=javascript>
function mybeep()
{
document.CEBrowseX.CETerm.PostIDA( "IDA_BEEP_LOUD", 0 );
}
</script>
</body>
</html>


Within this manual, we often assign the name “CEBrowseX” to the CEBrowseX
control when it is created. Usually this is followed by reference to the “CETerm”
object which has the methods we wish to use.

The PostIDA method sends an IDA Action Code as described in the previous
section. For example, action codes can activate the vibrator (for 500 millisec)
(IDA_VIBRATE_500), switch to a different CETerm session (IDA_SESSION_S1)
and many more actions.

The sample shown above can be used on both the Windows Mobile and
Windows CE .NET and 5.0 platforms. Under Windows CE, the example could
also be written as

<html>
<head>
<meta http-equiv="OnKey0x31" content="javascript:mybeep();"><! 1>
</head>
<body>
<a href="Javascript:mybeep();">Tap me or press 1 for beep</a><br>
...
<script language=javascript>
function mybeep()
{
external.CEBRowseX.CETerm.PostIDA( "IDA_BEEP_LOUD", 0 );
}
</script>
</body>
</html>

Advertising