beautypg.com

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

Page 46

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 46


document.form1.scan2.value = "";
document.form1.scan3.value = "";
ring();
document.form1.scan1.focus();
}

// Play a sound
function ring()
{
external.OS.PlayTone(10, 1000, 200);
}

// Handle the scan data
function onscan(data, source, type, time, length)
{
var current = document.activeElement;
if (current == document.form1.scan1 ||
current == document.form1.scan2 ||
current == document.form1.scan3)
{
current.value = data;

// NOTE: A postamble of "\t" will not be seen when using
// NOTE: the ScannerNavigate feature.
// NOTE: The following method advances the focus.
nextfield( current );
}
else
{
alert("Focus is not in an input field.");
}
}





Here is a similar Tab navigation example using the TextX input object. This
example does not use the ScannerNavigate tag. A Tab in the scanner post-
amble “\t” will advance the focus. However, a scan when focus is not in an input
field will be lost. Note the use of hidden fields to pass the TextX contents back to
the host.



Naurtech TextX