
67
Class Reference
responseData
– string; the response data.
Example:
function finishedCommand(commandSuccess,
responseType,
responseData)
{
if( !commandSuccess )
alert(postAlertFunc, "Command failed ("
+ respon ":" + respon ")");
}
reader.onCommandFinish = finishedCommand;
sends an alert when a command fails.
4.3.2.3
onDecode
The
onDecode
property of the
reader
object provides processing control to the
application program at the completion of a decode action. The handheld firmware passes
the decode object to the function through the calling argument.
Code the function in your script and return a code as follows:
null
– the decode has been consumed by the JavaScript application; there should be no
further processing of it by the handheld firmware.
false
– invalidate the decode; if the handheld firmware is so-configured, it will act as if
there had not been a decode; the good-decode-beep will be suppressed.
decode
– object (modified or unmodified) – the handheld firmware will continue to process
the modified or unmodified decode data.
Format:
function onDecode(decode)
{
var valid = true;
/* set to false below if decode is to be invalidated */
var passthrough = true;
/* set to false below if decode is consumed here */
/* processing statements, which may modify decode.data,
valid, and/or passthrough */
if( !valid )
return false;
if( !passthrough )