6 device properties and ceterm configuration – Casio Naurtech CETerm Ver.5.1 Web Browser Programming Manual User Manual

Page 15

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 15


Note that we do not require the CEBrowseX object under Windows CE because
we have direct access via the builtin “external” object.

2.6 D

EVICE

P

ROPERTIES AND

CET

ERM

C

ONFIGURATION

The CEBrowseX object or the “external” object can be used to access device
properties and to read or set portions of the CETerm configuration. The following
sample shows how this can be used


...
<body onload="javascript:fetchvalues();">
<object id="CEBrowseX" classid="clsid:D14943BD-4900-453E-8582-
725F21A57E0C" height=0, width=0></object>
<form id="form1" name="form1">
Property Features<br>
<input type="text" id="serialnumber" name="serialnumber"
size="20"><br>
<input type="text" id="ipaddress" name="ipaddress" size="20"><br>
</form>
...
<script language=javascript>
function fetchvalues()
{
document.form1.serialnumber.value =
document.CEBrowseX.CETerm.GetProperty( "device.serialnumber" );
document.form1.ipaddress.value =
document.CEBrowseX.CETerm.GetProperty( "device.ipaddress" );
}
</script>
...

There are several different properties currently accessible and more will be
added in future versions. These are documented in Appendix 1. One other
useful property gives access to the “User Text” area of CETerm. User Text are
strings of characters which may contain IDA codes and which can be “sent” to an
emulator. User Text strings are often tied to hardware keys to simplify text entry
or to create “mini-macros” of IDA actions. From the browser, the User Text can
be used as a general device-local persistant storage. They can also be used to
send the user to special pre-configured URL’s.

Here is an example of using a User Text area for persistent storage:

...
<body onload="javascript:loadfields();">
<object id="CEBrowseX" classid="clsid:D14943BD-4900-453E-8582-
725F21A57E0C" height=0, width=0></object>
<form id="form1" name="form1">
Login Page<br>
<input type="text" id="user" name="user" size="20"><br>
<input type="password" id="password" name="password" size="20"><br>

Advertising