Free 14-Day Evaluations    
Product Downloads    

Sign in     

 Home  >>  Documentation  >>  TinyTERM AX for Web  >>  HTML Page Setup

TinyTERM AX for Web Server Configuration

Once the Web page is in place, it needs to be configured. Its properties are set in the <script> sections of the Web page. Each property consists of a single argument and ends in a semicolon (;). No property name is case-sensitive, however. The use of upper and lower case below is for ease of reading, not required.

License Key

Edit the "Company Name" and License Key in the AddLicenseKey function. The license is case-sensitive, so either paste it in directly or be sure Caps Lock is on when typing it:

AddLicenseKey("Company Name", "ABCDE-12345-FGHIJ-67890-KLMNO");

Without a license key, or with an invalid key, TinyTERM AX for Web will load in the browser, but it won't connect. By default it displays an error message on a missing or invalid key.

Connection Protocol Type

By default, a basic telnet connection will be attempted. To add either SSH or SSL security by default, the connectionType property must be changed:

// Protocol for connection type (telnet, SSH or SSL/TLS)
// ConnectionType is 0 is for telnet, 5 for SSH and 4 is for SSL/TLS
cente.connectionType = 0;

Terminal Emulation Type

The terminal emulation type is set by the "emulation" property. The emulation types available by product are:


Emulation Value Terminal Type
0 ADM1
2 AT386
3 IBM 3101
7 TV912
8 TV925
9 TV950
10 VT100
11 Linux console
12 VT220
13 VT220-7
14 VT320
15 VT320-7
16 VT420
17 Wyse 50
18 Wyse 60
19 Wyse 60-25
20 IBM 3151
21 IBM 3151-25
28 ADDS ViewPoint

TinyTERM AX 5250

22 IBM 3179-2 (24x80)
23 IBM 3477-FC (27x132)

TinyTERM AX 3270

24 IBM 3278-2 (24x80)
25 IBM 3278-3 (32x80)
26 IBM 3278-4 (43x80)
27 IBM 3278-5 (27x132)
cente.emulation = 12; // default VT220 for AX UNIX
cente.emulation = 24; // default 3278 Mod 2 (24x80) for AX 3270
cente.emulation = 22; // default 3179-2 (24x80) for AX 5250

Preconfigured Hostname or Port number

The hostname or IP address can be specified for an automatic connection. If left blank, the hostname entered in the web page will be used. Setting the port to 0 will use the default for the connection protocol type.

cente.node = ""; // override hostname on web page
cente.netport = 23; // port override on all connections

At this point, the file should be saved and a test connection attempted, by setting up the Client PC as described below. After assuring that a connection works and the terminal emulator runs, more advanced options can be configured such as auto-login using an SSH username and/or password, and setting predefined codepage or keyboard layouts. Instructions for this are in the tinyterm.html file. In addition, the Form Input HTML Section can be modified to remove the edit box entries for hostname/username if desired.

SSL/TLS is available for both TN3270 and TN5250 emulations. SSH is available only for UNIX/Linux emulations. Telnet is available for all three.

Code Page

TinyTERM AX 5250 for Web includes seven different international code pages. TinyTERM AX UNIX has over 50. (For full lists, please see the sample HTML pages for TinyTERM AX 5250 and TinyTERM AX UNIX.) Load the code pages with these three commands:

cente.SetEmInCP("","STD 437 MS-DOS Latin US");
cente.SetEmOutCP("","STD 437 MS-DOS Latin US");
cente.SetKbdCP("","STD 437 MS-DOS Latin US");

Only the first command, cente.SetEmInCP();, is required for TinyTERM AX 5250. TinyTERM AX 3270 for Web has no code page options at this time.

Keyboard Layout

TinyTERM AX 3270 and TinyTERM AX 5250 include three different keyboard layouts:

  • Default
  • Reflection
cente.LoadKeyboard("", "Default.keyboard");

Descriptions of each are available here. TinyTERM AX UNIX has only a default keyboard layout.

Keyboard Mapping

If the default keyboard layouts need to be modified, individual keys can be mapped with the cente.AddKeyMapping property. It takes an argument that identifies a key and sets an equivalence string. For example:


configures the F12 function key to send the string "ABCDE" when pressed. The same format may be used to map other keyboard keys. The keyname may be any of the following when placed in in angle brackets < > :

F1 - F12 Function keys F1 F12
AF1 AF12 Alt-Function keys: hold the Alt key and hit F1 F12
cente.UseAlt=1; must also be set for this
SF1 SF12 Shift-Function keys
CF1 - CF12 Ctrl-Function keys
CSF1 CSF12 Ctrl-Shift-Function keys
ALTA ALTZ Alt keys a-z
Also requires cente.UseAlt=1;
KP0 KP9, KP+, etc. Keypad number and symbol keys. NumLock must be on
UP, DOWN, LEFT, RIGHT Arrow keys
HOME, END, PGUP, PGDN Named keys

In addition to text strings, special key values can also be entered in angle brackets:


Some keys are common to TinyTERM AX 3270, TinyTERM AX 5250 and TinyTERM AX UNIX. Others are specific to a given terminal type:

Common Keys

8 Backspace
9 Tab
13 Enter
276 Up
277 Down
278 Right
279 Left
280 Home
300 Insert
301 Delete

TN3270 and TN5250 Keys

1120-1143 PF1 to PF24
1144-1146 PA1 to PA3
1147 Back Tab
1148 Clear
1149 Erase Input
1150 Erase End of Field
1151 Attn
1152 New Line
1162 Field Mark
1163 Dup

TN5250 Keys

1172 Roll Up
1173 Roll Down

Automated Login

TinyTERM AX UNIX also provides for automated login. This requires building a login string for use with the cente.loginString property. The string consists of several elements:

^L## Number of times to attempt automatic login. Must be a two-digit number; i.e., ^L03. The loop starts over at the beginning if any wait string does not come within the timeout period.
^T## Timeout in seconds to wait for a prompt. Also must be two digits.
^M Send carriage return (ASCII 13) to remote host.
^Swait string^S Wait for text wait string from remote host. Strings are case-sensitive.
^W Wait one second.
send string If not set apart with ^S, a send string will be sent to the remote host.

A typical UNIX or Linux login prompt might be the word "login:", and a typical password prompt might be "Password:". Assuming three attempts with a five-second timeout, that would break down to this command:


Broken down into its individual elements, the string represents:

^L03 attempt login sequence three times
^T05 five-second timeout for prompt strings
^Slogin:^S wait for the string "login:"
^W if "login:" is received, wait one second
(if it's not received, the next login attempt begins)
username^M Send the string "username", followed by a carriage return
^SPassword:^S wait for the string "Password:"
^W if "Password:" is received, wait one second
(again, if it's not received, the next login attempt begins)
userpassword^M Send the string "userpassword", followed by a carriage return

Once the login string is complete, activate it before connecting with this command:

cente.autoLogin = 1;

This causes the string to execute after a connection is successful. Note that if this command is set after connecting, then automatic login won't happen.

Other Properties

A number of other settings are available through additional properties, which can be specified in the sample HTML page. For a full list of options, please see the Programmers Reference Manual in PDF format.

  Copyright © 2022 Century Software, Inc. All Rights Reserved  TERMS OF USE PRIVACY POLICY EULA