Free 14-Day Evaluations    
Product Downloads    

Sign in     


DESKTOP MOBILE DOWNLOAD PURCHASE SUPPORT INFO COMPANY
 Home  >>  Documentation  >>  TinyTERM AX for Web  >>  5250 Sample HTML Page

TinyTERM AX 5250 for Web Sample HTML Page

The following is a sample HTML page for loading TinyTERM AX 5250 for Web. It will need to be edited for use in a specific environment, as described in the in-line documentation.

TinyTERM AX 3270 Sample HTML Page TinyTERM AX 5250 Sample HTML Page TinyTERM AX UNIX Sample HTML Page

<html> <title>TinyTERM AX 5250</title> <body onload="setup()"> <!-- TinyTERM AX 5250 for Web HTML Configuration File v4.8.1_5595 - 07-12-2013 For questions or support, see http://www.centurysoftware.com/help/ax or email support@censoft.com, phone +1 801 268 3088x6 This file provides the preset connection settings used for running TinyTERM AX for Web in Internet Explorer. It must be edited by the web administrator and sets emulator type, network protocol used, optional automatic connecting, and whether hostname/username/password are preset or entered before connection. There are three sections for configuration: 1. Form Input HTML Section for entering hostname, username and password before connecting. 2. Object HTML Section for entering TinyTERM AX ClassID and position (changes each version) 3. Script Settings Section for entering license key, emulator type, connection protocol and other settings. --> <!-- Form Input HTML Section This form requests hostname, username and password. The username and password are only used for SSH connections, and should be removed for non-SSH connections. If the host input field is removed below, the host specified in the Script Settings Section will be used and an automatic connection will occur. --> <form name='kg'> <font face="Arial"><bold> <table> <tr> <td align=right>Connect To:</td> <td> <input type='text' name='host' id='host' size='40' maxlength='80' value='' /> </td> <td> <input type='button' id="submit" value='Connect' name='submit' onclick="conndisconn()"> </td> <td> <div id='status'><font color=red>Disconnected</font> </div> </td> </tr> </table> </bold></font> </form> <!-- The following item puts a Print Screen button and color controls just above the TE control --> <div id="print_color_form" style="height: 55px"> <input type='button' id="print" value='Print Screen' name='print' onclick="PrintScreen()"> <select id="attribute"></select> Text: <select id="foregroundcolor" name="foregroundColor"></select> Background: <select id="backgroundcolor" name="backgroundColor"></select> </div> <script type="text/javascript" language="javascript" src="jquery-1.10.1.min.js"></script> <script type="text/javascript" language="javascript" src="jquery.colourPicker.js"></script> <script type="text/javascript" language="javascript" src="json3.min.js"></script> <script type="text/javascript" language="javascript" src="century-local-settings.js"></script> <link href="jquery.colourPicker.css" rel="stylesheet"> <!-- Object HTML Section The CLSID below must be updated whenever the TinyTERM AX for Web .CAB file is updated. This is because the browser will cache all CLSID objects and would not retrieve the updated ActiveX control stored in the .CAB file. The size of the emulation window can be changed by changing the align parameter below. --> <object id="cente" classid="CLSID:9D589626-7294-11D2-BC1A-0020182BD6F6" codebase="ttax5250.cab#version=1,0,0,0" align="center" border="0" width="100%" height="80%"> </object> <!-- Script Settings Section This section must be modified by the web administrator to set the terminal emulation type, connection protocol, and other pre-configured parameters for the browser emulation session. --> <script type='text/javascript' language='javascript'> function setup() { // Change the company name and license key below with values provided you // by Century Software in the line below. // This will also need to be changed on each version number change. AddLicenseKey("Company Name", "ABCDEF-12345-GHIJK-67890-LMNOP"); // Protocol for connection type (telnet or SSL/TLS) // ConnectionType is 0 is for telnet and 4 is for SSL/TLS cente.connectionType = 0; // Fill in the hostname between the quotes in the next line to force an immediate connection. // If left blank, the hostname will be pulled from the Form Input HTML Section above. cente.node = ""; // Set the network port to connect to. Leave at 0 to automatically // select based on the connectionType set above. cente.netport = 0; // Set the 5250 terminal emulation type: // 21 IBM 3179-2 (24x80) // 22 IBM 3477-FC (27x132) cente.Emulation = 21; // Load the keyboard map. Available values are: // Default // Reflection // PCOMM LoadKeyboard("Default"); // Load the desired codepage. Available values are: // 1140 (Latin-1 w/Euro) // 037 (Latin-1) // 500 (Multinational) // 1148 (Multinational w/Euro) // 933 (Korean DBCS) // 935 (Simplified Chinese DBCS) // 1399 (Japanese DBCS) LoadCodepage("1140 (Latin-1 w/Euro)"); // This will customize the key mappings. AddKeyMap(); // This will display a startup banner with version number on startup. // Comment out to leave the screen blank. DisplayBanner(); // The following will pre-fill in the HTML form using any hardcoded values you changed above. // If you don't want this behavior, comment out the next line FillHTMLForm(); // If the host HTML form element is missing, auto-connect if(!document.getElementById("host")) connect(); // This command checks to see if TinyTERM is disconnected when the window is closed. // If TinyTERM is connected, a warning dialog pops up. window.onbeforeunload = checkForClose; // If uncommented, this function changes certain IBM identifier characters. // The first argument is the opening delimiter for DBCS characters. // The second argument is the closing delimiter for DBCS characters. // The third argument is the fill character for blanked fields, such as passwords. // cente.SetIBMChars(" "," ","*"); // This command loads the color settings and saves them for the individual user. CenturyLoadLocalSettings(); } function checkForClose(e) { if(cente.IsConnected) { var msg = "This action will cause you to be disconnected from the host"; return msg; } } // This function configures custom key mappings. function AddKeyMap() { // This line activates Alt keys in the terminal emulator, such as Alt-F1. // Comment out to use Alt keys for Internet Explorer. cente.useAlt = 1; // If uncommented, this line maps Ctrl-F to the Field Mark function. // cente.AddKeyMapping("<^F>=<1162>"); // The same format may be used to map most other keyboard keys. // The keyname may be any of the following when placed in in angle brackets <> : // F1 F12 (Function keys 1 12) // AF1 AF12 (Alt-Function keys: hold the Alt key and hit F1 F12) // SF1 SF12 (Shift-Function keys) // CF1 - CF12 (Ctrl-Function keys) // CSF1 CSF12 (Ctrl-Shift-Function keys) // ALTA ALTZ (Alt keys a-z, Windows may override) // KP0 KP9, KP+, (keypad number and symbol keys, NumLock must be on) // UP, DOWN, LEFT, RIGHT (Arrow keys) // HOME, END, PGUP, PGDN (Named keys) // // The key value after the equals sign = can be a text string, a TinyTERM script command preceded by <COMMAND>, // or a TN5250 key value in angle brackets <> : // 8 Backspace // 9 Tab // 13 Enter // 276 Up // 277 Down // 278 Right // 279 Left // 280 Home // 300 Insert // 301 Delete // 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 // 1153 New Line // 1161 Field Exit // 1162 Field Mark // 1163 Dup // 1172 Roll Up // 1173 Roll Down } // // END OF NORMALLY CHANGED SETTINGS // Please do not change the code below without a thorough understanding // function LoadKeyboard(section) { // The following will load the specified section from keyboard.dat in the current directory // The blank first parameter sets a special key handling mode for browsers cente.LoadKeyboard("", section + ".5250keyboard"); } function LoadCodepage(section) { // Load code page from specified section in codepage.dat in the current directory cente.SetEmInCP("", section + ".unicode"); } function PrintScreen() { // The following will print the contents of the emulator screen // It uses the default print settings in Internet Explorer cente.PrintScreen(); } var licenseStatus; function AddLicenseKey(regName, licenseKey) { var ret; ret = cente.AddLicenseKey(regName, licenseKey); switch(ret) { case 0x04: licenseStatus = "[EVAL EXPIRED]"; break; case 0x20: licenseStatus = "[LICENSE NOT FOR THIS VERSION]"; break; case 0x08: licenseStatus = "[INVALID LICENSE KEY]"; break; case 0x03: licenseStatus = "[EVAL WILL EXPIRE SOON]"; break; case 0x01: // License OK licenseStatus = ""; break; default: licenseStatus = "[UNLICENSED]"; break; } } function DisplayBanner() { cente.displayNL("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + "TinyTERM AX 5250 for Web v" + cente.version); cente.display(licenseStatus); } function connect() { var hostname, button; var ret; hostname = cente.node; if(hostname == "" && document.getElementById("host")) hostname = document.getElementById("host").value; button = document.getElementById("submit"); if(hostname == "") { alert("Please enter a hostname"); return; } cente.node = hostname; // No proxy cente.ProxyType = 0; // If netport is set to 0, automatically select the network port. // Set to 23 for telnet, 995 for SSL if(cente.netport == 0) { if(cente.ConnectionType == 0) cente.netport = 23; // Telnet else cente.netport = 995; // SSL } ret = cente.connect(); setStatus("<font color=blue>Connecting to " + hostname + "</font>"); cente.focus(); button.value = "Disconnect"; } // Called when the Connect/Disconnect button is pressed function conndisconn() { if(cente.IsConnected) disconnect(); else connect(); } function disconnect() { if(cente.IsConnected) { cente.Disconnect(); } } function setStatus(msg) { document.getElementById("status").innerHTML = msg; } // Fills in the HTML form from the current te control settings function FillHTMLForm() { if(cente.node != "" && document.getElementById("host")) { document.getElementById("host").value = cente.node; } } </script> <script for="cente" event="EDisconnect()"> // Handles disconnect events. On error, displays a message specifying what failed. var msg; var button; var hostname; hostname = document.getElementById("host").value; if(cente.LastError != 0) { switch(cente.LastError) { case 627: case 628: // Automatically accept fingerprint prompting cente.FingerPrint = hostname; cente.connect(); return; case 614: msg = "Invalid address"; break; case 961: msg = "Login refused by server"; break; case 10060: msg = "Connection timeout"; break; case 10061: msg = "Connection refused"; break; case 10054: msg = "Connection reset by peer"; break; default: msg = "Unknown error connecting"; break; } alert(msg + " (" + cente.LastError + ")"); } setStatus("<font color=red>Disconnected</font>"); button = document.getElementById("submit"); button.value = "Connect"; </script> <script for="cente" event="EConnect()"> // Changes status display to show hostname that's currently connected. var hostname; var button; button = document.getElementById("submit"); button.value = "Disconnect"; hostname = document.getElementById("host").value; setStatus("<font color=green>Connected to " + hostname + "</font>"); </script> </body> </html>
  Copyright © 2018 Century Software, Inc. All Rights Reserved  TERMS OF USE PRIVACY POLICY EULA