User manual - Web_Browser_Prog_Guide

NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE .NET / POCKET 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.");
}
}
</script>
</body>
</html>
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.
<html>
<head>
<title>Naurtech TextX</title>
<meta http-equiv="Scanner" content="Enabled">
</head>
<body onload="javascript:document.myform1.textx1.SetFocus(1);">
<form name=myform1