0 advanced topics, 1 navigating to pre-configured urls, 2 controlling the scanner – Casio Naurtech CETerm Ver.5.1 Web Browser Programming Manual User Manual

Page 42

Advertising
background image

4.0 Advanced Topics

In this chapter, we discuss several common, but advanced, topics for creating
robust Web based applications. We discuss how to overcome some limitations
of the Pocket IE browser behavior.

4.1 N

AVIGATING TO

P

RE

-

CONFIGURED

URL

S

The Naurtech Web Browser allows you to configure pre-defined URL’s which can
be associated with a hardware key, a KeyBar button, or activated from the within
the browser via a link or via JavaScript.

The URL is defined within a User Text string and this text can be submitted for
navigation by any of the ways listed above. For example, with the following
content in User Text 1:

\IDA_URL\file:///Program Files/myhelppage.htm\r


You can navigate to this local help page by activating the IDA code
IDA_USTRING_1 which has the friendly name “Text 1”. You can associate a
hardware key or a KeyBar button to this IDA code. Alternatively, you could use
any of the ways listed in the IDA Action Codes section to trigger the navigation.
For example the following link will send you to the help page:

<a href="ida:IDA_USTRING_1">Show Help Page</a>

Be sure to provide a way to navigate back to the application from your help page.
Note the required “\IDA_URL\” at the beginning of the URL and the “\r” at the
end. If your URL contains a literal backslash, it must be escaped with a second
backslash “\\”.

It is possible to change the contents of User Text from within JavaScript with the
“SetProperty” method of the CEBrowseX or “external” objects. Thus, this storage
can be used to maintain some persistent, device-local, information.

4.2 C

ONTROLLING THE

S

CANNER

We have shown how the Scanner and ScannerNavigate META tag identifiers can
be used to control the scanner. You can also use IDA codes to provide
additional control.

The scanner can be enabled or disabled via an IDA code. You can also activate
a “soft trigger” on most scanner equipped handhelds. This will start the scanner
without the user needing to hold the trigger. This mode is useful if the application
is driving the scanner in a “read loop” until a desired number of scans are
completed.

Advertising