Comments, Example – Casio Naurtech CETerm Ver.5.1 Web Browser Programming Manual User Manual
Page 32
 
N
AURTECH
W
EB
B
ROWSER
S
MART
C
LIENTS FOR
W
INDOWS
CE .NET / P
OCKET
PC
 
 
 
 
 
Web Browser Programming Guide
Page 32
 
 
There are two variants of the ScannerNavigate command for compatibility with 
other browsers. The first uses 5 parameters and the second uses 3 parameters. 
For the 5 parameter version, the “%s” are replaced with (1) barcode data, (2) 
source scanner name, (3) symbology type, (4) timestamp, and (5) barcode 
length. For the 3 parameter version, the “%s” are replaced with (1) barcode data, 
(2) symbology type, and (3) timestamp. 
 
The variant type is determined automatically. If there are other that 3 or 5 
substitution parameters, the ScannerNavigate tag is ignored. 
 
 
Comments
Only one ScannerNavigate tag is permitted on a page. The ScannerNavigate tag 
should be used to ensure that the scanner data is inserted into the correct input 
element, or is submitted directly via the URL. The barcode data can be 
examined, validated and/or edited prior to use. 
 
 
Example
<html> 
<head> 
<meta http-equiv="ScannerNavigate" 
 content="javascript:OnScan('%s', '%s', '%s', '%s', '%s');"> 
</head> 
<body> 
<object id="CEBrowseX" 
 classid="clsid:D14943BD-4900-453E-8582-725F21A57E0C" 
 height=0, width=0></object> 
<form name=form1> 
Fill With First Scan<br> 
<input type=text name="scan1" value="" size=30><br> 
Fill With Second Scan<br> 
<input type=text name="scan2" value="" size=30><br> 
 
<script language=javascript> 
function onscan(data, source, type, time, length) 
{ 
 if (document.form1.scan1.value == "") 
 { 
 document.form1.scan1.value = data; 
 } 
 else if (document.form1.scan2.value == "") 
 { 
 document.form1.scan2.value = data; 
 } 
 else 
 { 
 document.CEBrowseX.CETerm.PostIda("IDA_VIBRATE_500", 0);