Home

Naurtech Web Browser Programming Guide

image

Contents

1. 9 VKADD 6B JAddke 088 VK SUBTRACT 6D sSubtractkey 00 GEZE Web Browser Programming Guide Page 76 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Symbolic Name Keyboard Equivalent Value VKFTT 8 FTky 0880 VK F23 86 rF23key VVeb Brovvser Programming Guide Page 77 Glossary CEBrovvseX A Naurtech ActiveX control which provides access to the Naurtech Web Browser configuration and actions external This is the name of an implied object in the DOM of the Windows CE NET and CE 5 0 brovvser that gives access to special non standard features See the CEBrovvseX documentation for details GetProperty A method avallable via the CEBrovvseX ActiveX obiect or the CE NET external object to get a configuration value from the Web Browser IDA Action Code An IDA Action Code defines a special device application or emulation action within the Naurtech Smart Clients IDA codes can be tied to keys or KeyBars and invoked via META tags or JavaScript See the Appendix for a list of values PostiDA A method avallable via the CEBrovvseX ActiveX obiect or the CE NET external object to post an DA Action Code to the Web Browser SendiDA A method avallable via the CEBrovvseX ActiveX obiect or the CE NET external object to send an IDA Action Code to the Web Browser The SendIDA is a synchronous activation of the action SetProperty A method avallable vi
2. Symbolic Name Friendiy Name Description IDA IBM HOME IBM Home IDA DELETE Delete IDA INSERT ON Insert On IDA INSERT OFF Insert Off IDA INSERT TOGGLE Insert Toggle IDA ATIN Attn IDA_CLEAR Clear IDA_CURSOR_SELECT Cursor Select IDA_DUP DUP IDA_ERASE_EOF Erase EOF IDA_ERASE_INPUT Erase Input IDA HELD MARK Field Mark IDA NEVVLINE Nevvline IDA PA1 PA1 IDA PA2 PA2 IDA_PA3 PA3 IDA_RESET Reset IDA_SYSREQ Sys Request 5250 Specific Actions IDA_FIELD_EXIT Field Exit IDA_FIELD_PLUS Field IDA_FIELD_MINUS Field IDA_FIELD ADVANCE Field Advance IDA FIELD BACKSPACE Field Backspace IDA FIELD SUB Field SUB IDA HELP IBM Help IDA ROLL DOWN Roll Dovvn IDA ROLL UP Roll Up IDA ROLL LEFT Roll Left IDA ROLL RIGHT Roll Right IDA BACKSPACE Backspace IDA PRINT IBM Print VT Actions IDA ANSVVERBACK Ansvverback IDA FIND Find IDA INSERT HERE nsert Here IDA NEXT Next IDA PREVIOUS Previous VVeb Brovvser Programming Guide Page 70 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Symbolic Name Friendiy Name Description IDA REMOVE Remove IDA SELECT Select IDA VT PF1 VT PF1 Numpad PF1 key IDA VT PF2 VT PF2 Numpad PF2 key IDA VT PF3 VT PF3 Numpad PF3 key IDA VT PF4 VT PF4 Numpad PF4 key IDA
3. document CEBrowseX CETerm PostIDA IDA BEEP LOUD O lt script gt lt body gt lt html gt Within this manual we often assign the name CEBrovvseX to the CEBrovvseX control when it is created Usually this is followed by reference to the CETerm object which has the methods we wish to use The PostIDA method sends an IDA Action Code as described in the previous section For example action codes can activate the vibrator for 500 millisec IDA_VIBRATE_500 switch to a different CETerm session IDA_SESSION_ S1 and many more actions The sample shown above can be used on both the Windows Mobile and Windows CE NET and 5 0 platforms Under Windows CE the example could also be written as lt html gt lt head gt lt meta http eguiv OnKey0x31 content Javascript mybeep gt lt 1 gt lt head gt lt body gt lt a href Javascript mybeep gt Tap me or press 1 for beep lt a gt lt br gt lt script language javascript gt function mybeep external CEBRowseX CETerm PostIDA IDA BEEP LOUD O lt script gt lt body gt lt html gt Web Browser Programming Guide Page 14 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Note that vve do not require the CEBrovvseX obiect under VVindovvs CE because we have direct access via the builtin external object 2 6 DEVICE PROPERTIES AND CETERM CONFIGURATION The CEBrowseX object or the external obj
4. by the Web Browser version Comments This tag is supported for compatibility with other browsers Itis preferable to use the CETerm GetProperty method of the CEBrowseX control or the external object under CE NET or 5 0 only Example lt html gt lt head gt lt meta http equiv GetUnitInformation content javascript ReportInfo s 56 s gt Web Browser Programming Guide Page 23 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC lt head gt lt body gt This page reports unit information lt script language javascript gt function ReportInfo serial uuid version alert Serial Number serial nUUID uuid nVersion version lt script gt lt body gt lt html gt 3 8 HOMEKEY The HomeKey tag enables the home key F5 to navigate to the current home URL Syntax http equiv HomeKey content Enabled Disabled Comments This tag is supported for compatibility vvith other brovvsers t is preferable to use the IDA Action Code IDA URL HOME via the IDA META tag an ida URL or a PostIDA call This action can also be achieved with the OnKey tag This tag remains in effect until explicitly changed or the session ends Example lt html gt lt head gt lt meta http equiv HomeKey content Enabled gt lt head gt lt body gt Press F5 to navigate to the home URL lt body gt lt html gt 3 9 IDA Th
5. Hide Locked Comments This tag is used primarily when the SIP should be displayed upon loading a page Alternatively you can use an IDA Action Code via the IDA META tag an ida URL or a PostIDA call These latter techniques be used to change the SIP visibility during the user interaction with the page The Locked value will prevent the SIP from popping up when focus is set to a text input element under Pocket PC 2002 or Windows Mobile 2003 The locked state can also be set in the CETerm configuration dialogs Web Browser Programming Guide Page 36 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Example lt html gt lt head gt lt meta http eguiv SIP content Show gt lt head gt lt body gt The Soft Input Panel SIP should be visible lt body gt lt html gt 3 22 SIPUP The SIPUp tag makes the Soft Input Panel SIP visible Syntax http equiv SIPUp content Comments This tag is supported for compatibility with other browsers It is preferable to use the SIP META tag or the IDA Action Code IDA SIP SHOVV via the IDA META tag an ida URL or a PostIDA call The content is ignored but it must be present Example lt html gt lt head gt lt meta http equiv SIPUp content gt lt head gt lt body gt The Soft Input Panel SIP should be visible lt body gt lt html gt 3 23 TEXTSIZE The TextSize tag is used to set an overal
6. NAUR TECH CORPORATION VVeb Brovvser Programming Guide for Version 5 1 Naurtech Terminal Emulation and VVeb Brovvser Smart Clients for VVindovvs CE Devices CETerm CE3270 CE5250 CEVT220 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Copyright Notice This document may not be reproduced in full in part or in any form without prior written permission of Naurtech Corporation Naurtech Corporation makes no vvarranties vvith respect to the contents of this document and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose Further Naurtech Corporation reserves the right to revise this publication and to make changes to it from time to time without any obligation to notify any person or organization of such revision or changes Trademarks CETerm CE3270 CE5250 CEVT220 are trademarks of Naurtech Corporation Other product names mentioned in this manual may be trademarks or registered trademarks of their respective companies and are hereby acknowledged Software Version This document is for version 5 1 of Naurtech Web Browser smart clients Web Browser Programming Guide Page 2 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Table of Contents Additional Documentation Online Knowledgebase 11 0 Introduction Web Browser Programming Guide NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE
7. JavaScript methods for data validation and editing The scanner can also be enabled or disabled with META tags or from JavaScript Integration with CETerm Scripting and Automation Objects The web browser has access to the independent JavaScript engine running within CETerm and the associated Automation Objects This independent engine can enhance legacy web pages and add functionality The Automation Objects provide access to more features in CETerm and the underlying Windows OS Please refer to the CETerm Scripting Guide for full details Key Driven Interaction Hardware keys can be re assigned with HTML META tags to activate any desired action Keys can be used to navigate to specific pages to clear fields submit forms and even switch to different sessions On Screen Indicators Battery and WLAN RF strength can be displayed with on screen indicators The meters may also be displayed within KeyBar buttons On some devices keypad state indicators can also be displayed on screen Printing from HTML Several techniques are available to send print content from an HTML page to a printer The printer may be accessed via a serial port IrDA Bluetooth or the WLAN Web Browser Programming Guide Page 8 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Notification Features Sound vvav files tone generators beepers and vibrators can all be activated on devices which have these capabilities Contex
8. NET Pocket PC VVeb Brovvser Programming Guide Page 4 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Preface All of us at Naurtech Corporation constantly strive to deliver the highest quality products and services to our customers VVe are alvvays looking for vvays to improve our solutions If you have comments or suggestions please direct these to Naurtech Corporation e mail contact naurtech com Phone 1 425 837 0800 Assumptions This manual assumes you have vvorking knovvledge of Microsoft VVindovvs user interface metaphor and terminology Stylus based touch screen navigation terminology Dynamic HTML the browser DOM and JavaScript Basic operations and requirements of the host applications you vvant to access vvith the Naurtech smart client Conventions used in this Manual This manual uses the follovving typographical conventions e All user actions and interactions with the application are in bold as in Session Configure e Any precautionary notes or tips are presented as follows Tip Text associated with a specific tip S represents nevv version specific information e All text associated with samples is presented as follows We use lower case in most samples for readability lt html gt lt head gt lt title gt Naurtech Web Browser lt title gt lt meta http eguiv Scanner content Enabled gt Web Browser Programming Guide Page 5 NAURTECH WEB BROWSER SMA
9. gt lt OBJECT gt lt SCRIPT LANGUAGE UAVASCRIPT FOR textx EVENT OnChange gt MyOnChange lt SCRIPT gt lt SCRIPT LANGUAGE UAVASCRIPT FOR textx EVENT OnClick x y gt MyOnClick x y lt SCRIPT gt lt SCRIPT LANGUAGE JAVASCRIPT FOR textx EVENT OnFocus gt Show the SIP textx ShowSIP true lt SCRIPT gt lt SCRIPT LANGUAGE JAVASCRIPT FOR textx EVENT OnLostFocus gt Hide the SIP textx ShowSIP false lt SCRIPT gt lt SCRIPT LANGUAGE JAVASCRIPT FOR textx EVENT OnKeyDown key gt MyOnKeyDown key lt SCRIPT gt lt SCRIPT LANGUAGE JAVASCRIPT FOR textx EVENT OnKeyPress key gt Check key value return MyCheckKey key lt SCRIPT gt lt SCRIPT LANGUAGE JAVASCRIPT FOR textx EVENT OnKey p key gt MyOnKeyUp key lt SCRIPT gt CLASS D The TextX CLASSID is CLASSID clsid 6402E27B CD4F 448C BAEA F3558242459D METHODS Tvvo methods are available on the TextX obiect VVeb Brovvser Programming Guide Page 59 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC obiectname SetFocust select SetFocus will set the current focus to this TextX object If select is true then all of the text in the control will be selected objectname ShowSIP visible ShowSIP will cause the SIP to be visible if the argument is true It will hide the SIP if the argument is false This may also be accomplished via an IDA code
10. onkeypress myonkey gt lt br gt lt input type text name scan3 value size 30 onkeypress myonkey gt lt br gt lt input type button name clear value Clear Data onclick myclear onkeypress myonkey gt lt center gt lt form gt lt script for document event onkeypress gt IMPORTANT This handler is used when focus is not already in an input object myonkey lt script gt lt script language javascript gt Handle the key event function myonkey if window event keyCode 9 look for tab key nextfield document activeElement vindov event cancelBubble true Move from the current field to the next field function nextfield current if current document forml scanl else if current document form1 scan2 else document forml scan2 focus document forml scan3 focus document forml scanl focus Clear the fields function myclear document forml scanl value Web Browser Programming Guide Page 45 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC document forml scan2 value document forml scan3 value ring document forml scanl focus Play a sound function ring Handle the scan data function onscan data source type time length external 0S PlayTone 10 1000 200 var current document act
11. when the Enter key is pressed or received as a scanner post amble We recommend using the ScannerNavigate META tag for robust scanner input but vve also support the OnKey META tag vvithin native HTML text input elements This eliminates the third common reason for the TextX control There is no need to use the TextX control on VVindovvs CE NET platforms because the native HTML text input element has equlvalent features n summary vve recommend against using the TextX control but vve provide it for those situations vvhere the features are required SYNTAX lt OBJECT ID textx CLASSID clsid 6402E27B CD4F 448C BAEA F3558242459D HEIGHT 20 WIDTH 200 gt lt PARAM NAME ALIGNMENT VALUE left lt PARAM NAME AUTOHSCROLL VALUE true gt lt PARAM NAME AUTOVSCROLL VALUE false gt lt PARAM NAME BORDER VALUE true gt lt PARAM NAME FONTBOLD VALUE false gt Al zo oz lt PARAM NAME FONTFIXEDPITCH VALUE false gt lt PARAM NAME FONTITALIC VALUE false gt lt PARAM NAME FONTNAME VALUE Tahoma gt lt PARAM NAME FONTSIZE VALUE 10 gt NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC lt PARAM NAME FONTUNDERLINE VALUE false gt lt PARAM NAME FONTWEIGHT VALUE 400 gt lt PARAM NAME MAXLENGTH VALUE 20 gt lt PARAM NAME NUMBERONLY VALUE false gt lt PARAM NAME PASSNORD VALUE false gt lt PARAM NAME VALUE VALUE Empty gt lt PARAM NAME WANTRETURN VALUE false
12. CLIENTS FOR WINDOWS CE NET Pocket PC var serial var ceuuid var version function saveunitinfo serialarg ceuuidarg versionarg serial serialarg ceuuid ceuuidarg version versionarg lt script gt lt head gt lt body onload javascript checkversion gt check version variable and return info to host lt body gt Alternatively you can use a CEBrovvseX or external object to retrieve the version in a CETerm GetProperty call Other browsers will be able to create a CEBrovvseX object if it is installed but CETerm GetProperty will not return a valid result lt object id CEBrovseX classid clsid D14943BD 4900 453E 8582 725F21A57EOC height 0 width 0 gt lt object gt lt script language javascript gt function checkversion version document CEBrowseX CETerm GetProperty app version check the version value return info to host 4 6 DEVICE INFORMATION You can retrieve information about the device configuration using the CETerm GetProperty method See the CEBrovvseX section for details 4 7 SYMBOL WEB CLIENT An early browser developed for Symbol devices running the Palm OS had some extensions for controlling the scanner and printing These extensions were implemented through custom attributes on standard HTML tags and custom HTML tags The Naurtech Web Browser running on Windows CE NET or CE 5 0 platforms supports these extensions These extensions are no
13. GetProperty and SetProperty methods of the CEBrovvseX control Property Name Description Application Properties app buildid RO Program build identifier app name RO Program name app session active RO Currently active session app usertext NN User text NN contents NN is 1 64 app version RO Program version Device Properties device batterystatus RO Current battery status string device battery statustext RO device battery status RO Current battery status 1 unknown 0 critical 1 warning 2 low 3 medium 4 high 5 charging device battery level RO Current battery strength 0 100 1 unknown device deviceid RO Device ID string device ipaddress RO IP Address of handheld device macaddress RO MAC Address of handheld device platformid RO Windows CE Platform ID device presetid RO Windows CE Preset ID device rf strength RO RF signal strength 0 100 2 not associated with AP 1 unknown device rf status RO RF status 1 unknown 0 unassociated 1 poor 2 fair 3 good 4 very good 5 excellent device serialnumber RO Device serialnumber NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Property Name Description Session Properties session connection host Session host or home URL session connection port
14. Hide ToolBar Hide full Toolbar IDA TOOLBAND TOGGLEHIDE Toggle ToolBar Toggle Toolbar visibility IDA KEYBAR HIDE Hide KeyBar Hide KeyBar IDA KEYBAR TOGGLEHIDE KeyBar Toggle Toggle KeyBar visibility IDA KEYBAR LEFT Prev KeyBar Svvitch to previous KeyBar IDA KEYBAR RIGHT Next KeyBar Svvitch to next KeyBar IDA KEYBAR SEPARATOR Separator Separator for KeyBar IDA KEYBAR NONE Empty No action placeholder IDA HSCROLL HIDE HScroll Hide IDA HSCROLL VISIBLE HScroll Show IDA HSCROLL TOGGLEHIDE HScroll Toggle IDA HSCROLL PLUSON HScroll Right One IDA HSCROLL MINUSONE HScroll Left One IDA HSCROLL PLUSHALF HScroll Right Page IDA HSCROLL MINUSHALF HScroll Left Page IDA HSCROLL PLUSEND HScroll Right End IDA HSCROLL MINUSEND HScroll Left End IDA VSCROLL HIDE VScroll Hide IDA VSCROLL VISIBLE VScroll Show IDA VSCROLL TOGGLEHIDE VScroll Toggle IDA VSCROLL PLUSONE VScroll Up One IDA VSCROLL MINUSONE VScroll Down One IDA VSCROLL PLUSHALF VScroll Up Page IDA VSCROLL MINUSHALF VScroll Down Page IDA VSCROLL PLUSEND VScroll Up End IDA VSCROLL MINUSEND VScroll Down End IDA_FONT PLUS Font Inc Increase font size IDA FONT MINUS Font Dec Decrease font size IDA TOGGLE FONT BOLD Font Bold IDA SMARTPAD OPEN SmartPad Shovv IDA SMARTPAD CLOSE SmartPad Hide IDA SMA
15. OnAllKeys content Javascript myKeyAction 5s gt lt All keys gt lt head gt lt body gt Main Menu lt br gt 1 Cycle Count lt br gt 2 Inventory lt br gt 3 Receiving lt br gt Select an action lt br gt Press A to check version lt br gt lt script language javascript gt function myKeyAction vkcode lt script gt lt body gt lt html gt alert Key pressed vkcode 3 12 ONKEY The OnKey tag assigns a JavaScript action or URL to hardware keys on the handheld device The action will take place regardless of the focus location on the page Syntax http equiv O0nKey0xZZ OnKeyDDD OnKeylgnorelnText OnKeyVK name version 4 5 3 or later OnKey name version 4 5 3 or later content Javascript myKeyAction lt OY gt content http 10 1 1 8 inventory htm Where ZZ is a two digit hexadecimal number that represents the Windows CE Virtual Key Code VK for a physical key or DDD is up to 3 decimal digits representing the VK code or name is the portion of the Virtual Key symbolic name after the underscore Comments See the Appendix for a list of Virtual Key Codes their symbolic names hexadecimal representation and the typical keyboard name This tag allovvs several different formats to specify the VK value Using the symbolic name VVeb Brovvser Programming Guide Page 27 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC
16. Set location of SIP input panel OnAllKeys Bind all keys to JavaScript or URL action OnKey Bind key to JavaScript or URL action PovverOn davaScript or URL invoked on resume from suspend Reboot nvoke a device reset Scanner Enable disable the scanner ScannerNavigate davaScript or URL invoked on successful scan SetDate Set the system date NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Identifier Description SetTime Set the system time Signal Display on screen WLAN RF signal information SignalNavigate JavaScript or URL invoked with WLAN information SIP Control the SIP SIPUp Show the SIP TextSize Set text size factor zoom Timerinterval Set interval for TimerNavigate TimerNavigate JavaScript or URL invoked on Timerinterval Zebralabel Print Contents of data for printing ZebraLabel Complete JavaScript or URL invoked to report print status Several special tags contain a JavaScript statement or URL in the content Depending on the tag these may contain the text s which is replaced by data which is unique to the tag action You must have the correct number of replacement placeholders depending on the tag If the number is incorrect the tag vvill not be recognized When specifying a URL it may be any standard form The JavaScript form is simply a type of URL You may also use files local on the device file Application Data myapp errorpage htm err
17. TE session port session connection type Session type 3270 5250 VT220 HTML session printer network queue Web Browser Programming Guide Page 64 Appendix 2 IDA Action Codes Many IDA codes apply only to a Terminal Emulation session but are listed here for completeness Some IDA codes can only be used in restricted circumstances such as DA URL Symbolic Name Friendiy Name Description IDA BEL Bell IDA BS Backspace IDA HT Horizontal Tab IDA TAB Tab IDA LF Linefeed IDA VT Vertical Tab IDA FF Form Feed IDA CR Carriage Return Printable ASCII IDA SPACE lt Space gt IDA EXCLAMATION MARK IDA DOUBLE QUOTE IDA NUMBER SIGN DA DOLLAR SIGN IDA PERCENT Yo IDA AMPERSAND amp DA SINGLE GUOTE IDA LEFT PAREN IDA RIGHT PAREN IDA ASTERISK IDA PLUS IDA COMMA IDA HYPHEN IDA PERIOD IDA SLASH IDA 0 0 IDA 1 1 IDA 9 9 IDA COLON IDA SEMICOLON IDA LESS THAN x IDA EQUAL IDA GREATER THAN gt NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Symbolic Name Friendiy Name Description IDA QUESTION MARK IDA AT IDA_A A IDA B B IDA_Z Z IDA_LEFT BRACKET IDA BACKSLASH IDA RIGHT BRA
18. example of using a User Text area for persistent storage lt body onload javascript loadfields gt lt object id CEBrowseX classid clsid D14943BD 4900 453E 8582 725F21A57EOC height 0 width 0 gt lt object gt lt form id forml name forml gt Login Page lt br gt lt input type text id user name user size 20 gt lt br gt lt input type password id passvord name password size 20 gt lt br gt Web Browser Programming Guide Page 15 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC lt form gt lt script language javascript gt function loadfields var username document CEBrowseX CETerm GetProperty app usertext 1 if username Load with cached user name for this device document forml user value username lt script gt When the login is successful the application would store the current user name for the next login attempt function onlogin username Login was successful document CEBrowseX CETerm SetProperty app usertext 1 username There are some limitations with User Text The values are shared among all emulator sessions and currently there are only 64 slots available Web Browser Programming Guide Page 16 3 0 Special HTML META Tags This section describes the special META tags or elements that are recognized by the Naurtech VVeb Brovvser and are used to convey special instructions to the brovvser The META tags use the standar
19. format yields HTML that is easier to read and maintain See OnAllKeys to direct all key input to a single action Although most VK codes are uniform across devices some devices can remap the keyboard at a driver level to change the VK codes Consult your hardvvare documentation to understand vvhat VK codes are generated by the keys on your device Please note that some keys may be tied to operating system actions and they may not be sent to the running applications thus they cannot be used Other times they are tied to an action and will still be sent to the application so you may see side effects of their use All key shift states such as CTRL ALT and Shift are ignored by the OnKey action Hovvever it is possible to use shift states via key remapping as described below We recommended that you do not assign OnKey actions to the CTRL ALT or SHIFT keys themselves The Naurtech VVeb Brovvser has very flexible key remapping features n most cases any user action which simulates a key such as a KeyBar button or scanner post amble vvill invoke the OnKey action For example you may remap Shift r 1 vvithin the VVeb Brovvser key remapping to perform the F1 key action When Shift 1 is pressed in a browser session the OnKey action for F1 will be invoked Tapping on an F1 KeyBar button will also invoke the OnKey action Unlike the Naurtech VVeb Brovvser some other brovvsers do not act on OnKey assignments vvhen the focus i
20. lt head gt lt body gt The scanner will work on this page lt form name forml gt lt input type text name scan valuez size 30 gt lt br gt lt form gt lt body gt lt html gt 3 16 SCANNERNAVIGATE The ScannerNavigate tag directs scanner input to the specified JavaScript method or URL This tag should be used whenever possible to provide the most robust control of scanner input Syntax http equiv ScannerNavigate content jJavascript OnScan s content jJavascript OnScan s lt 1 Or gt content scan htm data s amp src s amp type s amp time s amp length s content scan htm data s amp type s amp time s Web Browser Programming Guide Page 31 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC There are two variants of the ScannerNavigate command for compatibility with other brovvsers The first uses 5 parameters and the second uses 3 parameters For the 5 parameter version the 0s 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 scan
21. or wave file depending on the specified sound Any wave file on the device may be specified Use the complete file path if the file is not in the Windows directory PlaySound is not available on the external object see PlayTone If the handheld device contains a programmable tone generator the sound parameter may also be a string which defines a sequence of tones to play The syntax is given below vvfffddd where vv is the volume 01 10 fff is the frequency in 10 s of MHz 000 999 ddd is the duration in 10 s of millisec 000 999 VVeb Brovvser Programming Guide Page 56 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC PlayTonef volume frequency duration PlayTone will play a tone if supported by the handheld hardware PlayTone is not available on the CEBrovvseX object see PlaySound volume is the volume 00 10 0 is off 10 is loudest frequency is the frequency in Hz duration is the duration in millisec Status PrintString printData or Status Print printData PrintString and Print will send the printData to the currently configured printer PrintString is only available on the CEBrovvseX object Print is only available on the external object The printData string may contain escape characters for CR Ir Newline In and hexadecimal bytes XXX PROPERTIES The CEBrovvseX properties are used to return the CETerm or OS obiects Both are rea
22. recommend you avoid using ActiveX controls for input to simplify and accelerate development f you must use the ActiveX text input then you can provide additional focus management The follovving example shovvs hovv to track the focus and advance the focus when the Tab key is pressed These techniques will work for the native HTML text input elements on VVindovvs CE platforms or vvith the ActiveX text input on Pocket PC 2002 and VVindovvs Mobile Both support the OnKeyPress event handlers This first example uses native HTML text input on VVindovvs CE NET Note the use of document activeElement in this example lt html gt lt head gt lt title gt Naurtech Tab Demo Page lt title gt lt meta http eguiv Scanner content Enabled gt lt meta http eguiv ScannerNavigate content Javascript onscan s Ss s Ss s gt lt meta http equiv OnKey0x0D content Javascript document forml clear click gt lt head gt lt body scroll no onload Javascript document forml scanl focus gt lt form name forml lt center gt lt font size 2 gt Naurtech Tab Demo lt br gt lt font gt Web Browser Programming Guide Page 44 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC lt br gt Focus starts in first input lt br gt lt input type text 1 value size 30 onkeypress myonkey gt lt br gt lt input type text 2 value size 30
23. 9
24. CKET IDA_CARET A IDA_UNDERSCORE IDA_BACKTICK IDA a a IDA b b IDA z z IDA LEFT BRACE IDA_PIPE IDA_RIGHT BRACE IDA_TILDE m IDA DEL DEL C1 ASCII Controls IDA IND Index IDA NEL Next Line IDA HTS Horiz Tab Set IDA RI Reverse Index IDA SS2 Single Shift 2 IDA SS3 Single Shift 3 IDA DCS Device Ctrl Str IDA PU1 Private Use One IDA PU2 Private Use Tvvo IDA CSI Ctrl Seg Intro IDA ST String Term IDA OSC OS Command IDA PM Private Msg IDA APC App Prog Cmd Internal Actions TE only Web Browser Programming Guide Page 66 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Symbolic Name Friendiy Name Description IDA UPDATE CURSOR Update Cursor IDA INH B T UPDATE Inhibit Update Don t update display IDA UNINHIBIT UPDATE Uninhibit Update Allow display update IDA UPDATE Update Force display update IDA INHIBIT SEND Inhibit Send VT buffer characters IDA UNINHIBIT SEND Uninhibit Send VT stop buffering IDA SEND PENDING Send Pending Chars VT send buffered chars Program Actions IDA PROGRAM ABOUT Program About Display About dialog IDA PROGRAM EX T Program Exit Exit program IDA PROGRAM EXITSILENT Program Exit Silent Exit program silentiy IDA PROGRAM HELP Program Help Display Help IDA SUSPEND DEVICE Suspend Device Enter suspend state IDA BLUETOOTH DISCOVE
25. Guide Page 40 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC 0x0a character The sequence is replaced by a byte with the hexadecimal value XX Use VU for a literal backslash The content is sent to the printer that is currently configured under the CETerm Printer tab This may be a serial attached printer Bluetooth or netvvork accessible printer Example lt html gt lt head gt lt NOTE The content must be on one line gt lt NOTE It is split here for readability gt lt meta http eguiv ZebraLabel Print content 100 200 200 1225 1 r n TEXT 0 2 1 0 Vendor r nTEXT 5 2 1 20 Adidas r n TEXT 0 2 1 80 Model r nTEXT 5 2 1 100 Adidas r n TEXT 5 2 1 135 Storm r nTEXT 5 1 200 Features r n TEXT 5 0 1 225 Cross Training r n TEXT 5 1 250 Arch Support r n TEXT 5 0 1 275 Leather Upper r n TEXT 5 1 300 Cushioned Insole r n TEXT 4 1 100 435 61 99 r n TEXT 0 2 1 550 r n TEXT180 4 1 250 700 61 99 r n TEXT180 5 0 270 740 000000292818 r n BARCODE UPCA 1 1 50 100 750 000000292818 r n TEXT180 5 0 320 910 WHITE RED r n TEXT180 5 320 935 Available in r n TEXT180 0 2 320 1025 r n JOURNAL r nPRINT r n gt lt meta http equiv ZebraLabel Complete content http 10 1 1 8 print htm status 3ld lt head gt lt body gt The print should be produced This message should not be visible lt body gt lt html gt Web Browser Programming Guide Pag
26. MoveSIP to move the default SIP location WARNING MoveSIP may move the SIP to a non visible location Usually entering the CETerm configuration dialogs will temporarily restore the SIP to the default location Also window and scroll behavior may be erratic on Windows Mobile devices with the SIP in a non standard location Example lt html gt lt head gt lt meta http equiv MoveSIP content x 0 gt lt meta http equiv MoveSIP content y 240 5 lt head gt lt body gt SIP is shifted down a bit lt body gt lt html gt 3 11 ONALLKEYS The OnAllKeys tag assigns a single JavaScript action or URL to all hardware keys on the handheld device The action will take place regardless of the focus location on the page Syntax http equiv OnAllKeys content Javascript myKeyAction 3s lt OY gt content http 10 1 1 8 inventory htm key s The 905 is replaced by the Windows CE Virtual Key Code VK value of the key pressed Comments See the Appendix 3 for a list of Virtual Key Codes their symbolic names hexadecimal representation and the typical keyboard name If an OnKey tag has been specified for an individual key that tag s action will be invoked in place of the OnAllKeys action See the OnKey tag for additional information Example lt html gt Web Browser Programming Guide Page 26 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC lt head gt lt meta http eguiv
27. Naurtech Web Browser provides control of the peripherals and simplifies actions such as data collection validation and printing All Naurtech Web Browsers are integrated with one or more Terminal Emulations TE which allows a natural migration path from legacy text based TE applications to newer Web based applications The Web based applications can be presented in a familiar single purpose locked down configuration which uses keys the touch screen or both for user interactions The Naurtech Web Browser offers control of the device peripherals and settings via integrated JavaScript extensions ActiveX controls and special HTML META tags This guide is written primarily to describe these extensions and custom features Please consult the standard references for details on JavaScript HTML syntax the browser Document Object Model DOM and other aspects of Dynamic HTML Please refer to the User s Manual for details on basic usage and configuration of the Naurtech Web Browser clients There is no current standard for the browser extensions and META tags that have been added to Web browsers for industrial handhelds Within the Naurtech Browser we strive to support all the ad hoc and de facto extensions available in other products In many cases the Naurtech Web Browser is a drop in replacement for these other products In addition we support nearly uniform behavior across a wide spectrum of devices from every major hardware device manufact
28. ON LAUNCHER One interesting use of the Web Browser is as a launcher for other browser or terminal emulation sessions The following example shows how a static web page on the device could be used to activate other sessions This example assumes that this web page is displayed under Session 4 Each of the other sessions must be configured for the desired activity lt html gt lt head gt lt title gt Naurtech Launch Page lt title gt lt meta http eguiv PowerOn content Javascript poweron gt lt meta http eguiv Scanner content Disabled gt lt meta http eguiv OnKey0x70 content Javascript startsession 1 gt lt Fl gt lt meta http eguiv OnKey0x71 content Javascript startsession 2 gt lt F2 gt lt meta http equiv OnKey0x72 content Javascript startsession 3 gt lt F3 gt lt head gt lt body gt lt object id CEBrovseX classid clsid D14943BD 4900 453E 8582 725F21A57E0C height 0 width 0 gt lt object gt lt form name forml gt lt font size 9 gt lt center gt Main Menu lt br gt lt center gt lt a href javascript startsession 1 gt F1l Pick lt a gt lt br gt lt a href javascript startsession 2 gt F2 Cycle Count lt a gt lt br gt lt a href javascript startsession 3 gt F3 Receive lt a gt lt br gt lt br gt lt font gt lt form gt lt script language javascript gt function poweron Navigate to Main Menu on resume Web Browser P
29. RT CLIENTS FOR WINDOWS CE NET Pocket PC lt meta http equiv ScannerNavigate Content Javascript onscan 3s 5s 5s 5s 53s gt lt head gt lt html gt Additional Documentation The Naurtech Web Browser is an integral feature of Naurtech terminal emulation Smart Clients Please refer to the User s Manual for these Smart Clients for detailed installation and configuration information The User s Manual may be downloaded from the Support section of our website You may also want to refer to the CETerm Scripting Guide for additional features to enhance the web browser Online Knowledgebase Although we continually strive to keep this manual up to date you may find our online support knowledgebase useful for the latest issues troubleshooting tips and updates You can access the support knowledgebase from our website at www naurtech com gt Support gt Knowledgebase VVeb Brovvser Programming Guide Page 6 1 0 Introduction The Naurtech Web Browser provides a robust and flexible environment for Web based applications which are accessed from a mobile device This browser is available for Windows CE NET Windows CE 5 0 Windows Mobile 2003 and Windows Mobile 5 0 based devices Device tailored versions of the browser are available for most industrial terminals These versions integrate with the peripherals on each device such as barcode scanner magnetic stripe reader RFID reader and Bluetooth printer The
30. RTPAD TOGGLEHIDE SmartPad Toggle Web Browser Programming Guide Page 68 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Symbolic Name Friendiy Name Description IDA SLEEP 10 Sleep 10msec IDA SLEEP 50 Sleep 50msec IDA SLEEP 200 Sleep 200msec IDA SLEEP 1000 Sleep 1sec IDA SLEEP 5000 Sleep 5sec IDA SLEEP 20000 Sleep 20sec IDA SLEEP 100000 Sleep 100sec IDA SCAN TRIGGER Scan Trigger Soft trigger scanner IDA MACRO OPEN Macro Shovv Shovv Macro Tool IDA MACRO CLOSE Macro Hide Hide Macro Tool IDA MACRO TOGGLEHIDE Macro Toggle Toggle Macro Tool hiding IDA MACRO RECORD Macro Record Start Macro record IDA MACRO STOP Macro Stop Stop Macro record IDA MACRO PLAY Macro Play Replay Macro IDA PRINT SCREEN Print Screen Print current screen IDA OlA H DE OlA Hide Hide IBM OlA bar IDA OlA VISIBLE OlA Shovv Show IBM OlA bar IDA TOGGLEHIDE OlA Toggle Toggle OlA bar visibility General IBM and VT Actions IDA PF1 F1 Not VT PF1 IDA PF2 F2 Not VT PF2 IDA PF3 F3 Not VT PF3 IDA PF4 F4 Not VT PF4 DA PF24 F24 IDA HOME Home IDA DOWN Down IDA UP Up IDA LEFT Left IDA RIGHT Right IDA ENTER Enter IBM Actions Web Browser Programming Guide Page 69 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC
31. RY Bluetooth Discovery Start discovery IDA WARMBOOT Warm Boot Warm boot device IDA COLDBOOT Cold Boot Cold boot device IDA MENU TOPBOTTOM Menu Top Bot Toggle menu location IDA MENU TOGGLEHIDE Menu Toggle Toggle menu visibility IDA_TOOLBAR_TOGGLE ToolBar Toggle Toggle toolbar visibility IDA_START_TOGGLEHIDE Start Menu Toggle Toggle Start visibility IDA MENUBAR TOGGLEHIDE 1 MenuBar Toggle Toggle menubar visibility IDA SESSION TOGGLECON Connect Discon Toggle session connection IDA SESS ON CONFIGURE Configure Configure session IDA SESS ON CONNECT Connect Connect session IDA SESS ON DISCONNECT Disconnect Disconnect session IDA SESSION NEXT LIVE Next Live Session Svvitch to next live session IDA SESSION PASSWORD Password Session password dialog IDA SESS ON PREV Prev Session Switch to previous session IDA SESS ON NEXT Next Session Switch to next session IDA SESS ON DISCON ALL Disconnect All Disonnect all sessions IDA SESS ON S1 Session 1 Switch to session 1 Web Browser Programming Guide Page 67 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Symbolic Name Friendiy Name Description IDA SESSION S2 Session 2 Switch to session 2 IDA SESS ON S3 Session 3 Switch to session 3 IDA SESS ON 54 Session 4 Switch to session 4 IDA TOOLBAND HIDE
32. VT COMMA Numpad Comma IDA NUMPAD 0 Numpad 0 IDA NUMPAD 1 Numpad 1 IDA NUMPAD 2 Numpad 2 IDA NUMPAD 3 Numpad 3 IDA NUMPAD 4 Numpad 4 IDA NUMPAD 5 Numpad 5 IDA NUMPAD 6 Numpad 6 IDA NUMPAD 7 Numpad 7 IDA NUMPAD 8 Numpad 8 IDA NUMPAD 9 Numpad 9 IDA VT ENTER Numpad Enter IDA VT MINUS Numpad Minus IDA VT PERIOD Numpad Period DA UDK F6 UDK F6 VT User Defined Key F6 IDA UDK F7 UDK F7 VT User Defined Key F7 DA UDK F20 UDK F20 VT User Defined Key F20 IDA VT HELP VT Help IDA VT DO VT Do DA ADD Add DA MULTIPLY Multiply DA DIVIDE Divide Custom VT Sequences DA VT 135 VT SAP0135 0x00 0x35 DA VT CSI M VT CSI M ESC M DA VT CSI N VT CSI N ESC N DA VT CSI O VT CSI O IDA VT CSI P VT CSI P Web Browser Programming Guide Page 71 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Symbolic Name Friendiy Name Description IDA VT CSI Q VT CSI Q IDA VT CSI R VT CSIR IDA VT CSI S VT CSIS IDA VT CSI T VT CSI T Windows App Keys IDA APPKEY K1 App Key 1 DA APPKEY 2 App Key 2 IDA APPKEY K16 App Key 16 IDA SCROLL UPPERLEFT Scroll Upper Left IDA SCROLL UPPERRGHT Scroll Upper Right IDA SCROLL LOWERLEFT Scroll Lower Left IDA SCROLL LOWERRGHT Scroll Lower Right IDA SCROLL CENTER Scroll Center IDA SCROLL CURSOR CENTER Scr
33. Windows Print Queues and direct to port printing for network printers See the CETerm ser s Manual for more details on configuring a printer All of the techniques for specifying print content allow common escape sequences to be embedded which will be converted to non printable characters These include the carriage return linefeed LF n and general hexadecimal bytes 0xXX 5 1 PRINTING VVITH A META TAG See the ZebraLabel Print and ZebraLabel Complete identifiers in the META tag section for details on initiating a print from a META tag 5 2 PRINTSTRING AND PRINT METHODS The PrintString method on the CEBrowseX control and the Print method on the external object behave similarly In both cases a string is constructed and sent to the current printer lt a href Javascript myprint gt Test External Print lt a gt lt script language javascript gt function myprint external Print 100 200 200 1225 1 r n TEXT 0 2 1 0 Vendor r n JOURNAL r n PRINT r n lt script gt 5 3 NAURTECH PRINT TAG The custom PRINT tag is supported for compatibility with other browsers See the Symbol Web Client section for a discussion of this tag NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC 5 4 ACTIVEX PRINTING CONTROLS There are numerous ActiveX controls available to send print content to a printer These are available from handheld m
34. a the CEBrovvseX ActiveX obiect or the CE NET external object to set a configuration value in the Web Browser TextX A Naurtech ActiveX control that is used vvith Pocket PC or VVindovvs Mobile 2003 platforms to provide a fully featured text input element which supports event handlers NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC ndex C CEBrowseX CLASSID 53 CEBrowseX Control 53 E external object 53 G GetProperty 54 62 H hidden fields 45 I iBrowse tags 16 IDA Action Codes 11 63 M META Tag Identifiers 16 Application 17 Battery 18 BatteryNavigate 19 Command 20 CursorPos 21 ErrorNavigate 21 GetUnitInformation 22 HomeKey 23 IDA 23 MoveSIP 24 OnAllKeys 25 OnKey 26 PLSeriesLabel Complete 38 PLSeriesLabel Print 39 PovverOn 28 Reboot 29 VVeb Brovvser Programming Guide Scanner 29 ScannerNavigate 30 SetDate 32 SetTime 32 Signal 33 SignalNavigate 34 35 SIPUp 36 TextSize 36 TimerInterval 37 TimerNavigate 37 ZebraLabel Complete 38 ZebraLabel Print 39 O OnChange 60 OnClick 60 OnFocus 60 OnKeyPress 61 OnKeyUp 61 OnLostFocus 60 P PlaySound 55 PlayTone 55 PostIDA 54 Print 55 PrintString 55 s SendIDA 54 SetFocus 59 SetProperty 55 62 ShowSIP 59 stiscan 50 stisubmit 50 T TextX CLASSID 58 TextX Control 57 Page 7
35. anufacturers printer manufacturers and third party sources All controls which follow accepted standards will work within the Naurtech Browser Currently we do not recommend any specific control 6 0 CEBrowseX Control The Naurtech CEBrowseX control is used to send commands to the Naurtech Web Browser and to access device and application information This control is installed when you install the Naurtech Web Browser On Windows CE NET or CE 5 0 based devices most of the CEBrowseX methods are available from the Document Object Model DOM external object In this case you do not need to instantiate a CEBrowseX object ALERT The CEBrowseX control has been updated in CETerm V5 1 to provide access to the new CETerm and OS automation objects used in the CETerm script engine The new CETerm object provides all the features that were previously available from CEBrowseX The CEBrowseX object should now only be used to access the CETerm or OS objects Existing web pages will continue to work but should be converted to the new syntax as they are updated ALERT See the CETerm Scripting Guide for full details on the CETerm and OS objects and their methods and properties Scripting in CETerm offers additional capabilities to enhance your web based applications SYNTAX lt object id CEBrowseX classid clsid D14943BD 4900 453E 8582 725F21A57EOC height 0 width 0 gt The CEBrovvseX control has no visible display b
36. ation lt span gt lt object gt lt br gt TextX2 lt object id textx2 classid clsid 6402E27B CD4F 448C BAEA F3558242459D height 22 width 150 gt lt object gt lt br gt lt br gt lt input type button name submitbutton value Submit OnClick mysubmit lt br gt lt input type hidden name hiddentextx1 gt lt input type hidden name hiddentextx2 gt lt center gt lt form gt lt script language javascript for textx1 event OnKeyPress key gt return MyKeyPress key document myforml textx2 lt script gt lt script language javascript for textx2 event OnKeyPress key gt return MyKeyPress key document myforml textx1 lt script gt lt script language javascript gt function mysubmit Put values of TextX into hidden input fields for host Otherwise host won t see control contents document myforml hiddentextx1l value document myforml textxl value document myforml hiddentextx2 value document myforml textx2 value Submit the form document myform1 submit function MyKeyPress key control if key 9 Advance the focus control SetFocus 1 Web Browser Programming Guide Page 47 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Focus has moved cancel the event return 1 Tust return the same key return 0 lt script gt lt body gt lt html gt 4 4 SESSI
37. d HTML format but are not recognized by standard brovvsers These special META tags assign hotkeys control the scanner configure the device and other tasks A META tag has the form lt meta http equiv identifier content valueString gt The Naurtech Browser supports a unigue set of identifier values However because there is no current standard for these META tags we also recognize most of the ad hoc and de facto extensions available in other products In particular we support most of the Symbol Pocket Browser and ntermec iBrowse META tag identifiers For the iBrowse META tags we recognize the identifiers with or without the leading IBrowse text The following table summarizes the supported identifier values and their functions Following the table are individual sections with detailed descriptions of the identifiers All identifiers are effective only on the page that contains them unless otherwise specified in the description Identifier Description Application Exit the program Battery Display on screen battery information BatteryNavigate JavaScript or URL invoked with battery information Command Exit the program CursorPos Set location of wait cursor ErrorNavigate JavaScript or URL invoked on error GetUnitInformation JavaScript or URL invoked with device information Enable disable home key 5 IDA Invoke IDA Action Code MoveSlP
38. d only Property Description CETerm CETerm automation obiect os OS automation obiect EVENTHANDLERS The CEBrowseX control has no event handlers VVeb Brovvser Programming Guide Page 57 7 0 TextX Control The Naurtech TextX control is a replacement for the HTML text input element on Pocket PC 2002 and Windows Mobile 2003 devices The native HTML text input element does not support most events and many properties Using the TextX object gives much greater control over user input However there are drawbacks to using the control such as increased HTML complexity and no desktop equivalent to simplify development This control is not installed when you install the Naurtech VVeb Brovvser Please contact Naurtech Support if you need this control You may create as many instances of this control each as a separate input element as you need on a page Each instance must have a unique ID Some other brovvsers must use an ActiveX control for text input because they are not able to prevent the auto popup of the SIP when focus is placed in a native HTML text input element The Naurtech Web Browser controls the SIP behavior independently and thus does not require the TextX control for this purpose Also the Naurtech VVeb Brovvser implements Tab key behavior betvveen native HTML text input elements eliminating another primary reason to use TextX The third most common reason to use and ActiveX text object is to submit a form
39. e 41 4 0 Advanced Topics In this chapter we discuss several common but advanced topics for creating robust VVeb based applications VVe discuss hovv to overcome some limitations of the Pocket IE browser behavior 4 1 NAVIGATING TO PRE CONFIGURED URLs The Naurtech Web Browser allovvs 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 vvithin a User Text string and this text can be submitted for navigation by any of the vvays listed above For example vvith the follovving 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 lt a href ida IDA USTRING 1 gt Show Help Page lt a gt 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 V It is possible to change the contents of User Text from within JavaScript wit
40. e IDA tag performs a wide range of actions to control the device and the client Web Browser Programming Guide Page 24 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Syntax http equiv IDA content IDA symbolicname Comments This tag offers rich functionality It is used primarily when an action is needed upon loading a page Alternatively an onload handler can be used in the BODY element to perform actions via JavaScript A list of IDA Action Codes and their description can be found in the Appendix All IDA symbolic names must be in upper case Any number of IDA meta tags may be specified on a single page They are acted upon sequentially when parsed Example lt html gt lt head gt lt meta http equiv IDA content IDA SIP SHOW gt lt head gt lt body gt The Soft Input Panel SIP should be visible lt body gt lt html gt 3 10 MovESIP The MoveSIP tag is used to reposition the Soft Input Panel SIP MoveSIP is not recommended for hiding the SIP off screen Use the SIP lockdown features within CETerm to prevent the SIP from popping up when not wanted Syntax http equiv MoveSIP content x n y m VVhere x and y are the screen coordinates vvith 0 0 in the upper left corner of the screen and x increasing to the right and y increasing downward Comments VVeb Brovvser Programming Guide Page 25 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Use
41. ect can be used to access device properties and to read or set portions of the CETerm configuration The following sample shows how this can be used lt body onload javascript fetchvalues gt lt object id CEBrowseX classid clsid D14943BD 4900 453E 8582 725F21A57E0C height 0 width 0 gt lt object gt lt form id forml name forml gt Property Features lt br gt lt input type text id serialnumber name serialnumber size 20 gt lt br gt lt input type text id ipaddress name ipaddress size 20 gt lt br gt lt form gt lt script language javascript gt function fetchvalues document forml serialnumber value document CEBrowseX CETerm GetProperty device serialnumber document forml ipaddress value document CEBrowseX CETerm GetProperty device ipaddress lt script gt There are several different properties currently accessible and more will be added in future versions These are documented in Appendix 1 One other useful property gives access to the User Text area of CETerm User Text are strings of characters which may contain IDA codes and which can be sent to an emulator User Text strings are often tied to hardware keys to simplify text entry or to create mini macros of IDA actions From the browser the User Text can be used as a general device local persistant storage They can also be used to send the user to special pre configured URL s Here is an
42. ed with the Timerinterval tag Web Browser Programming Guide Page 38 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Syntax http equiv TimerNavigate content jJavascript OnTimer s lt or gt content timer htm time s Where the s is replaced with the current time in the form hh mm ss Comments The effect of Timerlnterval and TimerNavigate tags can be accomplished using the Javascript setInterval and setTimeout methods on the window DOM object Using the Javascript methods is recommended Example lt html gt lt head gt lt meta http equiv TimerInterval content 1000 gt lt meta http equiv TimerNavigate content jJavascript OnTimer s gt lt head gt lt body gt Current time lt div id timerDiv gt junk lt div gt lt script language javascript gt function onTimer time lt script gt timerDiv innerHTML time lt body gt lt html gt 3 26 ZEBRALABEL COMPLETE OR PLSERIESLABEL COMPLETE The ZebraLabel_ Complete tag is used to report the status of a print from the ZebraLabel_Print tag The alternative identifier PLSeriesLabel_ Complete will also be recognized Syntax http equiv ZebraLabel Complete content jJavascript PrintStatus Sld N Or gt content http 10 1 1 8 print htm status 3ld Web Browser Programming Guide Page 39 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Comments This tag is
43. fying a font name will override some other attributes To create a multi line control simply use a large HEIGHT Multiline content with embedded r n cannot be set viaa PARAM element You can set such content dynamically in JavaScript via the Value property More than MaxLength characters can be inserted in the text box via the Value property EVENTHANDLERS The TextX control supports event handlers which are invoked when the user interacts with the control Only OnKeyPress returns a value This value can be set to cancel or ignore the event The return values of all other handlers are ignored and the associated events cannot be canceled void OnChange The OnChange handler is called when the contents of the control have been changed and focus is lost from the control void OnClick int x int y The OnClick handler is called when the user taps the stylus on the control The x and y coordinates of the tap are provided in the arguments void OnFocus The OnFocus handler is called when the control receives input focus void OnLostFocus The OnLostFocus handler is called when the control loses input focus void OnKeyDown int vkey The OnKeyDown handler is called when the user presses a key with focus in the control The vkey argument is the Windows VK Code for the key This handler Web Browser Programming Guide Page 61 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC may also be called when
44. h the SetProperty method of the CEBrovvseX or external objects Thus this storage can be used to maintain some persistent device local information 4 2 CONTROLLING THE SCANNER 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 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC lt meta http equiv Scanner content Enabled gt lt meta http eguiv ScannerNavigate content Javascript onscan s Ss Ss Ss s gt lt object id CEBrovseX classid clsid D14943BD 4900 453E 8582 725F21A57E0C height 0 width 0 gt lt object gt lt input type button name autoscan value Auto Scan onclick autoscan gt lt script language javascript gt function autoscan if autoscantrigger else autoscantrigger 0 autoscantrigger 1 document CEBrowseX CETerm PostIda IDA SCAN TRIGGER function onscan data source type time length if document forml scanl value else if docu
45. he date must be expressed in Coordinated Universal Time UTC You must use leading zeros for the day and month if less than 10 Comments If the date format is invalid this tag is ignored Example lt html gt lt head gt lt meta http equiv SetDate content 04 15 2004 5 lt head gt lt body gt lt body gt lt html gt 3 18 SETTIME The SetTime tag is used to set the current system time on the handheld Syntax http equiv SetTime content hh mm hh mm VVhere hh is the hour and mm is the minute The time must be expressed in Coordinated Universal Time UTC You must use leading zeros if less than 10 VVeb Brovvser Programming Guide Page 33 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Comments If the time format is invalid this tag is ignored Example lt html gt lt head gt lt meta http equiv SetTime content 12 01 5 lt head gt lt body gt lt body gt lt html gt 3 19 SIGNAL The Signal tag is used to configure the on screen WLAN RF signal strength meter This meter overlays the HTML content and is updated at a specified interval You can change the location and style of the meter Available styles include a horizontal or vertical single bar meter and a stepped bar meter The meter may be repositioned by a touch and drag stylus action if dragging is not disabled Syntax http eguiv Signal content Shov Hide Right Le f t Top B
46. ied within a CETerm configuration dialog Syntax http equiv BatteryNavigate content jJavascript OnBattery s s s 5s lt or gt content battery htm AC s amp strength s amp backup s amp chemistry s Where the 905 are replaced with 1 AC line status 2 main battery strength as a percentage 3 backup battery strength as a percentage and 3 the chemistry of the battery Comments This tag will work with or without a visible battery meter The strength normally ranges from 0 to 100 The special strength value of 1 indicates that the strength cannot be determined If you use a URL for the action in most cases the URL will navigate away from the current page rather than repeatedly calling a JavaScript method Example lt html gt Web Browser Programming Guide Page 20 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC lt head gt lt meta http eguiv BatteryNavigate content jJavascript OnBattery s 58 568 S gt lt head gt lt body gt lt script language javascript gt function OnBattery ACstate strength backup chemistry if strength 1 alert Unable to determine battery strength else alert Battery strength strength lt script gt lt body gt lt html gt 3 4 COMMAND The Command tag performs actions which affect the client application Currently this only exits the web browser Syntax http equ
47. iv Command content exit Comments This tag is supported for compatibility with other browsers It is preferable to use the IDA Action Code IDA PROGRAM EX T via the IDA META tag an ida URL or a PostIDA call Example lt html gt lt head gt lt meta http equiv Command content exit gt lt head gt lt body gt This message should not be visible lt body gt lt html gt Web Browser Programming Guide Page 21 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC 3 5 CURSORPOS The CursorPos tag is used to reposition the busy cursor when it is visible The busy cursor may appear vvhile vvaiting for pages to load Use CursorPos to move the busy cursor from the default location at the center of the screen Syntax http equiv CursorPos content x n y m VVhere x and y are the screen coordinates vvith 0 0 in the upper left corner of the screen and x increasing to the right and y increasing downward Comments The new position only applies to the page loading busy cursor other busy cursors will be unaffected The new position will apply until changed with another CursorPos tag Example lt html gt lt head gt lt meta http equiv CursorPos content x 0 gt lt meta http equiv CursorPos content y 0 gt lt head gt lt body gt Busy cursor in upper left corner lt body gt lt html gt 3 6 ERRORNAVIGATE The ErrorNavigate tag directs error mes
48. iveElement if current document forml scanl current document forml scan2 current document forml 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 lt script gt lt body gt lt html gt 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 V 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 lt html gt lt head gt lt title gt Naurtech TextX lt title gt lt meta http eguiv Scanner content Enabled gt lt head gt lt body onload javascript document myforml textx1 SetFocus 1 gt lt form name myforml Web Browser Programming Guide Page 46 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC onload javascript document myforml textx1 SetFocus gt Naurtech TextX Tab Test lt br gt Windows Mobile 2003 lt br gt lt br gt lt center gt TextX1 lt object id textx1 classid clsid 6402E27B CD4F 448C BAEA F3558242459D height 22 width 150 gt lt span style color red gt TextX1 failed to load Please check browser configur
49. keys are simulated within the Web Browser via KeyBar buttons or remapped physical keys int OnKeyPresst int akey The OnKeyPress handler is called when a key is pressed which generates an ASCII character The akey argument contains the ASCII character vvhich is generated The return value from this handler controls the event propagation A return value of 0 will continue the event a value of 1 will cancel the event Any positive value will replace the akey in this event This handler is called before the character is placed in the input object so changing the return value will change the character placed in the obiect void OnKeyUpf int vkey The OnKeyUp handler is called when the user releases a key with focus in the control The vkey argument is the VVindovvs VK Code for the key This handler is not called when keys are simulated from within the Web Browser VVeb Brovvser Programming Guide Page 62 Appendix 1 Properties The properties listed in this appendix may be accessed via the GetProperty and SetProperty methods on the CEBrovvseX ActiveX control or via the DOM external obiect under VVindovvs CE NET or 5 0 Properties marked RO are read only and may not be set with SetProperty ALERT Use the CETerm obiect methods GetProperty and SetProperty to access properties There are many additional properties described in the CETerm Scripting Guide The following list is included for older applications that used the deprecated
50. l occur when the handheld device resumes operation after a power suspend Syntax http equiv Poveron content Javascript PowerOnAction lt Or gt content http 10 1 1 8 login htm mode resume Comments This tag is useful to set the browser to a consistent URL or state after a suspend resume cycle For example a user authentication can be required to maintain security Example lt html gt lt head gt lt meta http equiv Poveron content http 10 1 1 8 login htm mode resume gt lt head gt lt body gt lt body gt lt html gt Web Browser Programming Guide Page 29 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC 3 14 REBOOT The Reboot tag will invoke a warm soft or cold hard reset of the device WARNING Do not perform the cold reset unless you are prepared to lose all current settings data and add on programs on the device Syntax http equiv Reboot content Warm Cold Comments This tag is supported for compatibility with other browsers It is preferable to use the IDA Action Code IDA VVARMBOOT via the IDA META tag an ida URL or a PostIDA call A warm reset will cause all un saved work in progress to be lost A cold boot will reset all RAM to factory original configurations A cold boot will typically clear all network and device settings user data files and add on programs that have not been placed in non volatile memory The reset will occur as so
51. l text zoom level The zoom level can also be changed manually with font sizing buttons on the Toolbar or KeyBar Syntax http equiv TextSize content Smallest Smaller Medium Web Browser Programming Guide Page 37 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Larger Largest Comments The TextSize tag is somevvhat misnamed Relative text sizes are determined by the HTML content TextSize applies an overall zoom factor to the sizes set in the HTML The initial zoom value will be the last value set for the session whether by a TextSize tag or by manual actions Example lt html gt lt head gt lt meta http eguiv TextSize content Largest gt lt head gt lt body gt This is the Largest TextSize zoom lt body gt lt html gt 3 24 TIMER NTERVAL The Timerinterval tag is used to specify the interval between activations of the TimerNavigate action Syntax http equiv TimerInterval content milliseconds Where milliseconds is the number of milliseconds between activations Comments The effect of Timerinterval and TimerNavigate tags can be accomplished using the Javascript setInterval and setTimeout methods on the window DOM object Using the Javascript methods is recommended Example See example under TimerNavigate 3 25 TIMERNAVIGATE The TimerNavigate tag causes the specified JavaScript or URL to be invoked on a regular interval The interval is specifi
52. log Syntax http equiv SignalNavigate content jJavascript OnSignal Ss 58 s lt or gt content signal htm strength s amp ESSID s amp MAC s Where the s are replaced with 1 signal strength 2 ESSID and 3 the MAC address of the device Comments This tag will work with or without a visible WLAN signal meter The strength normally ranges from 0 to 100 The special strength value of 2 indicates that the device is not associated with any access point The special strength value of 1 indicates that the strength cannot be determined If you use a URL for the action in most cases the URL will navigate away from the current page rather than repeatedly calling a JavaScript method Web Browser Programming Guide Page 35 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Example lt html gt lt head gt lt meta http eguiv SignalNavigate content jJavascript OnSignal s 58 Ss gt lt head gt lt body gt lt script language javascript gt function OnSignal strength ESSID MACAddress if strength 2 alert RF radio is not associated else if strength 1 alert Unable to determine RF signal strength else lt script gt alert RF Signal strength strength lt body gt lt html gt 3 21 SIP The SIP tag controls the visibility of the Soft Input Panel SIP Syntax http equiv SIP content Show
53. lphaNum IDA KBD UPPERALPHA KeyMode Upper Alpha IDA KBD LOVVERALPHA Keymode Lovver Alpha IDA KBD FUNCMODE KeyMode Func IDA KBD CYCLEMODE KeyMode Cycle Cycle to next mode IDA POPUP IPADDRESS Shovv IP Address IDA POPUP MACADDRESS Shovv MAC Address IDA POPUP BATTERY Shovv Battery IDA POPUP TIME Shovv Time IDA POPUP SERIALNUMBER Show Serial IDA_POPUP_DEVICEID Show Device ID IDA_POPUP_RFINFO Show RF info Web Browser Programming Guide Page 73 Appendix 3 Virtual Key Codes This appendix contains a list of Windows CE Virtual Key Codes VK which are used vvith the OnKey META tag Notice that there is no case distinction of the alphabetic keys Also note that the symbols on the tops of the digit keys are not listed because they are a shift state of the digit keys Symbolic Name Keyboard Equivalent Value VK BACK key 000 VK TAB TABkey 0888 VK RETURN FNTERkey 08 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Symbolic Name Keyboard Equivalent vane Web Browser Programming Guide Page 75 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Symbolic Name Keyboard Equivalent Value 5S5STS NUMPADO 60 Numeric keypad VK NUMPAD6 66 Numeric keypad 6key 080 VK NUMPADS 68 Numeric keypad 8 key VK NUMPAD9 69 Numeric
54. mand We recommend using 5 rather than SendIDA There are only rare situations when SendIDA must be used SendIiDA IDACode session SendIDA sends an DA action command to the Web Browser and directs it to the specified session Valid session values are 1 4 The special session value of 0 will send the command to the current session See the Appendix for IDA values Web Browser Programming Guide Page 55 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC The SendIDA method will attempt to complete the action before returning We recommend using PostIDA rather than SendIDA There are only rare situations when SendiDA must be used SendText text session SendText sends a text string to the Web Browser and directs it to the specified session Valid session values are 1 4 The special session value of 0 will send the command to the current session The text string may include IDA symbolic names between backslash characters V The IDA codes will be interpolated as the text is sent Value GetProperty propertyName GetProperty will return the named property value This may be a device property application property or session property See the Appendix for a list of available properties Status SetProperty propertyName propertyValue SetProperty will assign the given value to the named property See the Appendix for a list of available properties PlaySound sound PlaySound will play a tone
55. ment forml scan2 value else if document forml scan3 value document forml scanl value data document forml scan2 value data document forml scan3 value data autoscantrigger 0 else autoscantrigger 0 document CEBrowseX CETerm PostIda IDA VIBRATE 500 alert Form full scan discarded if autoscantrigger document CEBrowseX CETerm PostIda IDA SCAN TRIGGER Web Browser Programming Guide Page 43 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC lt script gt 4 3 NPUT FOCUS AND THE TAB KEY One of the first limitations you are likely to notice about Pocket Internet Explorer is that the Tab key does not always move the input focus as you expect from using the desktop nternet Explorer Pocket IE on the Pocket PC 2002 and Windows Mobile platforms has the most limited behavior The Naurtech VVeb Brovvser provides enhanced focus control on the Pocket PC platforms If you only need to move between native HTML text input elements then the Tab key should perform as you expect from the desktop The Tab key should also vvork as expected on VVindovvs CE NET or 5 0 platforms Hovvever currently a Tab post amble will not advance the focus on all platforms Some other vendors provide a text input control like Naurtech s TextX to manage the focus under Pocket PC 2002 or VVindovvs Mobile TextX vvill perform similarly but we
56. ner 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 lt html gt lt head gt lt meta http equiv ScannerNavigate content jJavascript OnScan Ss 568 58 58 SS gt lt head gt lt body gt lt object id CEBrowseX classid clsid D14943BD 4900 453E 8582 725F21A57EOC height 0 width 0 gt lt object gt lt form name forml gt Fill With First Scan lt br gt lt input type text 1 valuez size 30 gt lt br gt Fill With Second Scan lt br gt lt input type text 2 value size 30 gt lt br gt lt script language javascript gt function onscan data source type time length if document forml scanl value document forml scanl value data else if document forml scan2 value document forml scan2 value data else document CEBrowseX CETerm PostIda IDA VIBRATE 500 0 Web Browser Programming Guide Page 32 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC alert Form full scan discarded lt script gt lt form gt lt body gt lt html gt 3 17 SETDATE The SetDate tag is used to set the current system date on the handheld Syntax http equiv SetDate content mm dd yyyy mm 5 dd YYYY mm dd yyyy Where mm is the month dd is the day and yyyy is the year T
57. no ssmsg ss You may also use the proprietary ida type to invoke various actions 3 1 APPLICATION The Application tag performs actions vvhich affect the client application Currently this only exits the vveb brovvser Syntax http equiv Application content Quit Comments This tag is supported for compatibility with other browsers It is preferable to use the IDA Action Code IDA PROGRAM EX T via the IDA META tag an ida URL or a PostIDA call Example lt html gt Web Browser Programming Guide Page 18 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC lt head gt lt meta http equiv Application content Quit gt lt head gt lt body gt This message should not be visible lt body gt lt html gt 3 2 BATTERY The Battery tag is used to configure the on screen battery strength meter This meter overlays the HTML content and is updated at a specified interval You can change the location and style of the meter Available styles include a horizontal or vertical single bar meter or filled battery icon The meter may be repositioned by a touch and drag stylus action if dragging is not disabled Syntax http equiv Battery content Show Hide Right Left Bottom x n yem HBattery VBattery AllowDrag NoDrag Where x and y are the screen coordinates of the upper left corner of the meter icon The screen coordinate 0 0 is in
58. oll Cursor Center IDA SCROLL CURSOR VISIBLE Scroll Cursor Visible IDA COPYALL Copy All Copy screen to clipboard IDA PASTE Paste Past clipboard IDA USTRING 0 Text 1 Send user text 1 IDA USTRING 1 Text2 Send user text 2 DA USTRING 63 Text 64 Send user text 64 IDA SCR PT 1 Script 1 Run Script 1 IDA SCR PT 2 Script 2 Run Script 2 IDA SCR PT 64 Script 64 Run Script 64 IDA SIP HIDE SIP Hide IDA SIP SHOVV SIP Shovv IDA TOGGLEHIDE SIP Toggle IDA SIP LOCKDOVVN SIP Lockdovvn IDA SIP UNLOCK SIP Unlock IDA SIP UP SIP Up IDA SIP DOWN SIP Down IDA SIP FORCEDOVVN SIP Forcedovvn VVeb Brovvser Programming Guide Page 72 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Symbolic Name Friendiy Name Description IDA IM KEYBOARD IM Keyboard IDA IM LOCKED IM Locked HTML Actions IDA URL HOME URL Home IDA URL BACK URL Back IDA URL URL Defines start of URL Special Actions IDA VIBRATE 100 Vibrate 100ms IDA VIBRATE 200 Vibrate 200ms IDA VIBRATE 500 Vibrate 500ms IDA VIBRATE 1000 Vibrate 1sec IDA V BRATE 2000 Vibrate 2sec IDA VIBRATE 5000 Vibrate 5sec IDA BEEP OK Beep IDA BEEP WARN Beep Warn IDA BEEP LOUD Beep Loud IDA KBD ALPHA KeyMode Alpha IDA KBD NUMERIC KeyMode Numeric IDA KBD ALPHANUM KeyMode A
59. on as the tag is parsed Example lt html gt lt head gt lt meta http equiv Reboot content Warm gt lt head gt lt body gt This message should not be visible lt body gt lt html gt 3 15 SCANNER The Scanner tag is used to enable or disable the barcode scanner Syntax http eguiv Scanner content Enabled Disabled Comments VVeb Brovvser Programming Guide Page 30 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC This tag is used to enable or disable the scanner when a page is first loaded You can also use the IDA codes IDA SCAN RESUME and IDA SCAN SUSPEND to change the state from an IDA META tag an ida URL or dynamically via a Post DA call VVe do not support the AutoEnter or AutoTab content values These values are un needed because these and more complex scanner post ambles can be configured within the Naurtech Web Browser See the User s Manual for more information about the scanner configuration Under VVindovvs Mobile 2003 the Naurtech VVeb Brovvser vvill advance focus within native HTML text input objects when the Tab entered via a key or post amble without any extra handlers All other scanner configurations are maintained within the Web Browser configuration dialogs These settings are session dependent and may be different for different Web browser or TE sessions Example lt html gt lt head gt lt meta http equiv Scanner content Enabled gt
60. ottom x n yem Steps AllowDrag NoDrag Where x and y are the screen coordinates of the upper left corner of the meter icon The screen coordinate 0 0 is in the upper left corner of the screen with x increasing to the right and y increasing downward Right Left Top and Bottom change the orientation of the meter and the placement of the WLAN icon Steps enables the step style meter AllowDrag will allow the user to drag the meter whereas NoDrag will prevent dragging Comments Web Browser Programming Guide Page 34 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC This tag is used to control the VVLAN RF meter display The meter may also be controlled vvithin the CETerm configuration independent of the Signal tag The Signal tag vvill alvvays override the internal configuration and vvill persist until changed by another Signal tag VVithin the CETerm configuration you can specify the update interval and a notification when the strength falls below a designated level Example lt html gt lt head gt lt meta http eguiv Signal content Show gt lt meta http eguiv Signal content Steps gt lt head gt lt body gt The RF meter should be visible lt body gt lt html gt 3 20 SIGNALNAVIGATE The SignalNavigate tag causes the specified JavaScript or URL to be invoked with WLAN signal information on a regular interval The interval can be specified within a CETerm configuration dia
61. r we provide access to those features through JavaScript We also provide access to most operations of the Browser client such as switching to other sessions or retrieving device or configuration information To access these features you can use an ActiveX control or for the CE NET or Windows CE 5 0 platforms you can use the Document Object Model DOM external object There are slight differences between these two approaches however they basically work the same ALERT The CEBrowsexX control has been updated in CETerm V5 1 to provide access to the new CETerm and OS automation objects used in the CETerm script engine The new CETerm object provides all the features that were previously available from CEBrovvseX Please note the revised syntax Existing web pages will continue to work but should be converted to the new syntax as they are updated Web Browser Programming Guide Page 13 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC The following example uses the ActiveX CEBrovvseX control to sound a tone lt html gt lt head gt lt meta http eguiv OnKey0x31 content Javascript mybeep gt lt 15 lt head gt lt body gt lt object id CEBrovseX classid clsid D14943BD 4900 453E 8582 725F21A57EOC height 0 width 0 gt lt object gt lt a href Javascript mybeep gt Tap me or press 1 for beep lt a gt lt br gt lt script language javascript gt function mybeep
62. rogramming Guide Page 48 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC sendida IDA SESSION S4 0 function startsession id if id gt 1 amp amp id lt 4 Switch to session sendida IDA SESSION S id 0 Connect if not connected sendida IDA SESSION CONNECT id return else alert Unsupported session function sendida ida s PocketPC 2002 CEBrovseX CETerm SendIDA ida s Windows Mobile document CEBrovseX CETerm SendIDA ida s lt script gt lt body gt lt html gt 4 5 HOW TO DENTIFY THE CURRENT BROWSER The Naurtech Web Browser returns the same User Agent HTTP value as does the standard Windows Pocket IE browser This is necessary to indicate the fundamental capabilities of the browser to the Web server There are other ways for the Web application to determine if the Naurtech Web Browser is the client You can use the GetUnitlnformation META tag identifier to retrieve the version number and send this to the host As of this writing the current version number is 5 1 0 Most other browsers will not support the GetUnitlnformation feature and your HTML must be prepared to return an empiy value lt html gt lt head gt lt meta http equiv GetUnitInformation content Javascript saveunitinfo s s s gt lt script language javascript gt Web Browser Programming Guide Page 49 NAURTECH WEB BROWSER SMART
63. s are especially important on Windows Mobile based systems The Windows Mobile browser does not have native support for special key actions but the Naurtech Web Browser overcomes this limitation The simplest way to assign a key to a special action is to use a special HTML META tag This will instruct the browser to execute a JavaScript method or navigate to a pre specified URL when the key is pressed lt meta http eguiv OnKey0x70 content Javascript onFlkey gt lt 1 lt script language javascript gt function onFlkey Clear entry document form 0 barcode value lt script gt or lt meta http eguiv OnKey0x70 content home htm s lt Fl gt It is important to know that the OnKey META tag acts as a hotkey and it will activate the action even if the focus is in a text input element If you assign an action to a normal key such as 1 then you will be unable to enter the 1 as a character anywhere on the page Techniques are available to ignore the hotkey action within text input elements Web Browser Programming Guide Page 11 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC 2 3 TEXT NPUT ELEMENTS AlI VVeb applications vvill use text input elements at some point to collect information such as a barcode or count The standard text input element is the HTML INPUT such as lt input type text name count maxlength 10 size 10 gt The capabilities of the
64. s in a native text INPUT element or in an ActiveX text component Under Pocket PC and Windows Mobile 2003 the OnKeylgnoreln Text tag can be used to ignore the OnKey assignments when the focus is in a native text input element or in a TextX input object The content is ignored for OnKeylgnoreln Text There is no limit to the number of OnKey assignments within a page Example lt html gt lt head gt lt meta http equiv OnKeyO x1B content Tavascript document forml0l1 clearbutton click sci ESC gt lt meta http equiv OnKeyO x31 content cyclecount htm gt lt 1 gt lt meta http eguiv OnKey0x32 content inventory htm gt lt 2 gt lt meta http equiv OnKeyO x33 content receiving htm gt lt 3 gt lt meta http eguiv OnKey0x41 content ida IDA PROGRAM ABOUT gt lt A gt lt head gt Web Browser Programming Guide Page 28 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC lt body gt Main Menu lt br gt 4 Cycle Count lt br gt 5 Inventory lt br gt 6 Receiving lt br gt Select an action lt br gt Press A to check version lt br gt lt form 1 lt input type text name scan valuez size 30 gt lt br gt lt input type button name clearbutton value Clear Scanned Data onclick javascript document forml scan value gt lt form gt lt body gt lt html gt 3 13 POWERON The PowerOn tag specifies an action that wil
65. sages to a JavaScript method or to a URL Syntax http equiv ErrorNavigate content jJavascript MyErrorHandler s s los OL content http 10 1 1 8 errorpage htm errno s amp msg s lt or to hide errors gt content jJavascript var HideErrors s s The first Yos is replaced by an error number and the second s by an error message Web Browser Programming Guide Page 22 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Comments This tag should be the first special META tag defined on the page but not before any davaScript methods that may be invoked by the content f this tag is not specified errors are reported via popup messages Example lt html gt lt head gt lt script language javascript gt function MyErrorHandler errno msg alert Error Number errno nMessage msg lt script gt lt meta http equiv ErrorNavigate content jJavascript MyErrorHandler s s gt lt head gt lt body gt lt body gt lt html gt 3 7 GETUNITINFORMATION The GetUnitlnformation tag reports device and client information to the host or user Syntax http equiv GetUnitInformation content jJavascript ReportInfo s s s lt Or gt content http 10 1 1 8 uinfo htm serial s amp uuid s amp version s The first 965 is replaced by the device serial number the second 905 by the Windows CE device UUID and third s
66. see IDA Action Codes PROPERTIES The TextX control has several properties to control the appearance and behavior of the object All properties may be set in an initial PARAM statement or set dynamically via JavaScript unless described otherwise Property Description Values Default Value Alignment Text justification LEFT RIGHT CENTER LEFT AutoHScroll Text will autoscroll TRUE FALSE TRUE horizontally AutoVScroll Text will autoscroll TRUE FALSE FALSE vertically on Enter Border Show border lines TRUE FALSE TRUE FontBold Use bold font TRUE FALSE FALSE FontFixedPitch Use fixed pitch font TRUE FALSE FALSE Fontltalic Use italic font TRUE FALSE FALSE FontName Font for obiect any on device System FontSize Size of font 6 28 10 FontUnderline Use underlined font TRUE FALSE FALSE FontVVeight VVeight of font 300 light 400 normal 400 700 bold 900 heavy MaxLength Maximum text length 0 8192 0 no limit 0 NumberOnly Only accept digits TRUE FALSE FALSE Password Display text as s TRUE FALSE FALSE Value Text content any text empty VVantReturn Enter gives a nevvline TRUE FALSE FALSE in Multiline control VVeb Brovvser Programming Guide Page 60 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Some font properties may conflict or may not yield visible differences on all devices FontBold is equivalent to FontWeight 700 Speci
67. sion or shovv the SIP There are many DA codes and these are documented Appendix 2 in this manual Almost any action which can be invoked by a KeyBar or assigned to a hardware key can be invoked by an IDA code Under the Web Browser IDA codes can be sent to the program in several different ways They can be in a special META tag in an HTML link or sent via JavaScript Here is a sample which pops up the SIP when a page loads lt meta http equiv IDA content IDA SIP SHOW gt VVeb Brovvser Programming Guide Page 12 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC Or you can toggle the SIP visibility from a link lt a href ida IDA SIP TOGGLEHIDE gt Toggle Soft Input Panel SIP lt a gt Or you can perform the action from JavaScript by setting the document location lt script language javascript gt function togglehide Toggle the SIP visibility This format may not work for Pocket PC location href ida IDA SIP TOGGLEHIDE Or remove the comment characters document location ida IDA SIP TOGGLEHIDE Or remove the comment characters window navigate ida IDA SIP TOGGLEHIDE lt script gt The next section describes additional methods for invoking IDA Action Codes from within a JavaScript method 2 5 DEVICE CONTROL FROM JAVASCRIPT The Naurtech Web Browser is tailored to the features of most handheld devices If the handheld has a vibrator or tone generato
68. supported for compatibility with other brovvsers t is preferable to use other techniques for sending print content to a printer See the advanced topic Printing from HTML The status code of the print action will be substituted into the old location A status of 0 indicates success 1 indicates failure See ZebraLabel Print for more details Example lt html gt lt head gt lt meta http eguiv ZebraLabel Complete content http 10 1 1 8 print htm status 3ld lt meta http eguiv ZebraLabel Print content 200 200 581 1 r nLABEL PRINT r n gt lt head gt lt body gt The print should be produced This message should not be visible lt body gt lt html gt 3 27 ZEBRALABEL PRINT OR PLSERIESLABEL PRINT The ZebraLabel Print tag contains data that is sent to a Zebra printer The ZebraLabel Complete tag must also be present to report the status of the print The alternative identifier PLSeriesLabel Print vvill also be recognized Syntax http equiv ZebraLabel Print content 0 200 200 581 1 r nLABEL PRINT r n gt Comments This tag is supported for compatibility with other brovvsers t is preferable to use other techniques for sending print content to a printer See the advanced topic Printing from HTML The contents must be less than 1024 characters Any r sequences are replaced by the CR 0x0d character Any n sequences are replaced by the NL VVeb Brovvser Programming
69. t Menus Custom context menus can be defined to provide access to special actions without tying up valuable screen real estate Web Browser Programming Guide Page 9 2 0 Common Tasks This section describes some common vvays that enhanced features can be used vvithin a VVeb based application Here vve shovv hovv to manage scanner input invoke actions via keys and interact vvith the handheld device Only small code snippets are shovvn For complete details see the reference sections of this manual These tasks help to illustrate the power of the Naurtech Web Browser for building VVeb based applications 2 1 SCANNER NPUT The barcode scanner and other readers such as magnetic card readers and RFID readers are typically integrated with the Naurtech client The configuration of the reader is maintained by the Naurtech client and is managed to allow an independent configuration for each host session When data is available from a reader it is directed to the current host session The data is typically inserted at the current cursor or focus location For a Web page with multiple text input elements this can be problematic The focus may be in the wrong text element or if the focus is not in a text element the input may be lost A better way to receive scanner input is to use an extension which directs the data to a JavaScript method or submits it to a URL To enable this action you must define a special HTML META tag and a JavaScrip
70. t method to process the data Here is a typical META tag lt meta http equiv ScannerNavigate content Javascript onscan Ss Ss s s s gt When the scanner reads a barcode each of the s items will be filled with information from the scan and the onscan method will be invoked Here is a typical method which shows what each argument contains lt script language javascript gt function onscan data source type time length alert The barcode scanned was data nThe symbology was type nScanned at time nWith a length of length lt script gt This method simply presents a popup message with the scanner data More typically the data would be validated and inserted into a text element The HTML form containing that element may also be submitted lt script language javascript gt NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC function onscan data source type time length if length gt 5 document form 0 barcode value data document form 0 submit lt script gt 2 2 KEY ACTIONS In many situations a Web application will be written to make special use of the keys on a handheld The device may be used without a stylus or there may be function keys Fx which the application uses to perform special actions The Naurtech Web Browser has several special features to make use of the hardware keys These feature
71. t supported on Pocket PC 2002 or Windows Mobile based devices These extensions are supported for compatibility with existing Web based applications New Web applications should use the META tags Web Browser Programming Guide Page 50 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC On the text INPUT element vve support the stiscan and stisubmit attributes f present the stiscan attribute controls which symbologies may be inserted into the input element If no value is specified all symbologies are allowed If an empty string is specified no symbologies are allovved VVhen the stisubmit attribute is present the enclosing form will be submitted after scanned data is inserted in the element lt input type text name upc size 12 maxlength 16 stiscan ABCDEFGHIJKLMN stisubmit gt The custom element BEEP is supported to sound a tone lt NAURTECH beep frequency f repeat n duration d gt where f is in Hz n is a count and d is in milliseconds The handheld device must support a tone generator The NAURTECH namespace label is required The custom element PRINT is supported to send print content to the printer lt NAURTECH print name printer type N announce yes retries 3 gt Print content here n r lt print gt where printer is the destination name of the printer and type is the connection type The NAURTECH namespace label is required The following connec
72. text input element are different for different Windows CE platforms The Windows Mobile platform has the most limited text input For example this input element does not support special event handlers such as OnKeyPress does not respond to the Tab key to advance the focus and will popup the Soft Input Panel SIP whenever focus is received by the element The Naurtech Web Browser corrects these deficiencies by adding Tab key support and by locking down the SIP when desired We can also provide an ActiveX control TextX which can be used in place of the native input element if it is essential to trap all keys with an OnKeyPress handler However with the unigue behavior of the OnKey META tag within native text elements along with the Tab key and SIP control the TextX input control is not usually needed Avoiding the TextX input control simplifies the HTML and accelerates application development VVe describe the use of the TextX control in this manual for those situations vvhere it is required Under the Windows CE NET and CE 5 0 platform the native text INPUT element fully supports the OnKeyPress handler as vvell as other events and the TextX control is never needed 2 4 IDA AcTION CODES An IDA Action Code is a special value that is used to invoke a device action program action or emulator action vvithin the Naurtech Smart Client IDA Action Codes can invoke special keys under terminal emulation sound a tone connect a ses
73. the upper left corner of the screen with x increasing to the right and y increasing downward Right Left Top and Bottom change the orientation of the meter and the placement of the icon HBattery enables a horizontal battery icon filled according to strength VBattery enables a vertical battery icon filled according to strength AllowDrag will allow the user to drag the meter whereas NoDrag will prevent dragging Comments This tag is used to control the battery meter display The meter may also be controlled within the CETerm configuration independent of the Battery tag The Battery tag will always override the internal configuration and will persist until changed by another Battery tag Within the CETerm configuration you can Web Browser Programming Guide Page 19 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC specify the update interval and a notification when the strength falls below a designated level Example lt html gt lt head gt lt meta http eguiv Battery content Show gt lt meta http equiv Battery content HBattery gt lt meta http eguiv Battery content x 200 5 lt meta http equiv Battery content y 20 gt lt head gt lt body gt The horizontal battery icon should be visible lt body gt lt html gt 3 3 BATTERYNAVIGATE The BatteryNavigate tag causes the specified JavaScript or URL to be invoked with battery information on a regular interval The interval can be specif
74. tion types are supported Connection Name Values Description Type Q Name is the Windows print Print to Windows print queue name queue N Printer IP address or hostname Print directly to port and port For example 192 168 1 101 6101 dddd Same as N but port specified Print directly to port as dddd I B S other ignored Print to configured printer for current session Standard escape characters such as r nn and xXX will be substituted in the print contents Literal line breaks in the content are ignored you must use rum if the printer language requires a line break Web Browser Programming Guide Page 51 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC You can set the values of the currently configured network printer using the CETerm SetProperty method on the CEBrovvseX or external objects Web Browser Programming Guide Page 52 5 0 Printing from HTML There are numerous vvays to print from the Naurtech VVeb Brovvser Once a printer is configured print content may be specified via a special META tag the CEBrovvseX or external objects the custom PRINT tag or with any ActiveX control designed to print from a brovvser The Naurtech Web Browser maintains the printer configuration within the Session configuration dialogs Here you may specify a serial attached Bluetooth IrDA or network attached printer We support both
75. urers Beyond these basic extensions vve have added many unique features to enable you to build more povverful business applications 1 1 FEATURE HIGHLIGHTS Follovving are some of the special features and extensions in the Naurtech VVeb Brovvser Access Control Device Lockdovvn Access controls allow administrators to hide the start bar and to prevent users from exiting the Naurtech client You NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC can hide the VVindovvs CE Start button the vvhole Start bar and or the application menu bars and toolbars Users are prevented from navigating to un authorized Web sites as is possible with Pocket IE Multiple Browser Sessions All Naurtech clients allow up to 4 simultaneous sessions Each session can be connected to a different VVeb application This allovvs quick access to separate applications Each session supports a unique scanner configuration Enhanced native HTML text INPUT Under Pocket PC 2002 and Windows Mobile 2003 the standard HTML text INPUT element will popup the SIP when it receives focus and will not respond to the Tab key to advance the focus The Naurtech Web Browser can prevent the SIP popup and enables Tab based navigation without resorting to ActiveX input objects Native HTML text INPUT elements are easier to use and help maintain consistency across different platforms Scanner Control via JavaScript Scanner input can be intercepted by
76. ut you must specify height and width of zero to prevent the object from consuming space on the page Web Browser Programming Guide Page 54 NAURTECH WEB BROWSER SMART CLIENTS FOR WINDOWS CE NET Pocket PC CLASS D The CEBrovvseX CLASSID is CLASSID clsid D14943BD 4900 453E 8582 725F21A57EOC METHODS The follovving methods are available Note that most are marked as deprecated DEP in favor of using the CETerm or OS obiect and their associated methods The CETerm and OS objects are obtained from the corresponding CEBrowseX properties Method Action PostIDA Send a command to a session asynchronous DEP SendIDA Send a command to a session synchronous DEP SendText Send text content to a session DEP GetProperty Get a property value from the Web Browser DEP SetProperty Set a property value in the Web Browser DEP PlaySound Play a tone or wave file on the device CEBrovvseX only DEP PlayTone Play a tone on the device external only DEP PrintString Send content to a printer CEBrowseX only Print Send content to a printer external only PostIDA IDACode session PostIDA sends an IDA action command to the Web Browser and directs it to the specified session Valid session values are 1 4 The special session value of 0 will send the command to the current session See the Appendix for IDA values The PostIDA command will return before the Web Browser acts on the com

Download Pdf Manuals

image

Related Search

Related Contents

Electrolux DU 3150 User's Manual    1 - Brother  7081 869-02  Aufgabe 1    Service Manual  

Copyright © All rights reserved.
Failed to retrieve file