D028868 CR1500 CR1100 CR2700 JavaScript Programming Guide User Manual Page 7 of 41
The Code Corporation
12393 South Gateway Park Place, Suite 600, Draper, UT 84020
+1 (801) 495-2200
FAX +1 (801) 495-0280
Introduction
Code Corporation (Code) designs, develops, and manufactures image-based readers and software tools for data
collection applications. With expertise in software development, optics, imaging, and Bluetooth™ wireless
technology, Code is an innovative leader in the Auto ID and Data Collection Industries.
Many Code readers combine bar code reading with an easy-to-use JavaScript- based application development.
This user manual is applicable for the CR1100, CR1500 and CR2700 series readers.
Document Purpose
This manual describes the JavaScript application programming interface (API) for the Code readers (CR1100,
CR1500 and CR2700). It is assumed the user has programming knowledge and familiarity with the JavaScript
language.
Code readers read barcodes and can be programmed to transmit code data over a selected
communications link, or to store data in reader memory (batch mode when available).
The programming environment provides interfaces to:
o Read and manipulate data in reader memory
o Access data sent by host
o Transmit data to a host computer, via communication link
o Select type of communication link
o Set, change, and retrieve reader configuration settings
Document Audience
This document is designed to guide Code reader users and Developers that wish to customize the behavior of
the reader. The commands outlined are targeted at manipulating data, such as removing characters, translating
one set of characters to another, and providing different types of output, based on the type of barcode read,
appending characters, tabs or new lines, etc.
Document and Coding Conventions
This document employs the following conventions to aid in readability:
Words that are part of the application development description use the Courier New font
Code examples use the bold Courier New font in blue
Variable names that must be supplied by the programmer are: Courier New font and are
enclosed in relational signs; for example: <variable_name>.
The Code reader JavaScript library uses the following naming conventions:
Identifiers: Mixed-case with a capital letter, where words join (soCalledCamelCase), e.g.,
nasaSpaceShuttle, httpServer, codeXml
Acronyms and other initialisms are capitalized like words, e.g., CIMCE, CPU
Variables and Properties: Initial lower case, e.g., thisIsAVariable, thatIsAProperty
Classes (i.e., constructors): Initial capital, e.g., AClassIsCapitalizedCamelCase
Functions: Initial lower case, similar to variables and properties