USER GUIDE
Another solution is to give the ip and port address in the HTML file loading the TN5250 applet.
<HTML> <HEAD> <TITLE> Mocha TN5250 example </TITLE> </HEAD> <BODY> <APPLET CODE="tn5250.class" ARCHIVE="tn5250.jar" WIDTH="800" HEIGHT="500" scriptable="true"> <param name="host" value="myas400"> <param name="port" value="23"> <param name="ssl" value="false"> <param name="27x132" value="true"> <param name="ebcdic" value="37"> <param name="autoconnect" value="false"> <param name="keylayout" value=""> <param name="user" value=""> <param name="password" value=""> <param name="license" value=""> <param name="license_key" value=""> <param name="hotspots" value="true"> <param name="font" value="Courier New"> <param name="fontstyle" value="Plain"> <param name="margin" value="36"> <param name="tool_bar" value="true"> <param name="menu_bar" value="true"> <param name="show_fxx" value="true"> <param name="negotiate" value="false"> <param name="debug" value="false"> <param name="color_bg" value="#000000"> <param name="color_cursor" value="#FFFFFF"> <param name="color_select" value="#808080"> <param name="color_red" value="#FF0000"> <param name="color_blue" value="#5E98FE"> <param name="color_pink" value="#FF00FF"> <param name="color_green" value="#00FF00"> <param name="color_turquoise" value="#00FFFF"> <param name="color_yellow" value="#FFFF00"> <param name="color_white" value="#FFFFFF"> <param name="keylayout" value="default"> <param name="keepalive" value="false"> <param name="show-f1-f12" value="true"> <param name="show-f13-f24" value="false"> <param name="show-extra" value="true"> <param name="2xclick" value="false"> <param name="nodialog" value="false"> <param name="ignorexhelp" value="true"> <param name="fieldexit" value="false"> <param name="beep" value="true"> <param name="hideviewmenu" value="false"> <param name="hideoptionmenu" value="false"> <param name="smallconnectdialog" value="false"> <param name="separator" value="true"> <param name="devicename" value=""> </applet> </body> </html>CODE parameter must always be "TN5250.class". It is the name of the master file for the binary Mocha TN5250 product. To use the full width use "100%"
Each parameter
is build of a name and a value. In the example above parameter host is
given value myas400.
It is very important to remember <> around each line, and the value must
be surrounded with "".
As to give keyboard focus to the applet when loaded add a small script:
<script type="text/javascript"> onload = function() { document.getElementsByTagName( "APPLET" )[0].focus(); } </script>
Syntax:
name=keylayout value="<a file name>"
Syntax:
name=license value="<name of a company>"
Syntax:
name=license_key value="<encrypted key>"
Syntax:
name=user value=<userid>
name=password value=<password>
Example:
name=user value="joe"
name=password value="password"
Syntax:
name=ebcdic value="codepage number"
Example:
name=ebcdic value="277"
Syntax:
name=nodialog value="true | false"
Default is false.
Syntax:
name=ignorexhelp value="true | false"
Default is true.
Syntax:
name=fieldexit value="true | false"
Default is false.
Syntax:
name=beep value="true | false"
Default is true.
Syntax:
name=hideviewmenu value="true | false"
Default is false.
Syntax:
name=hideoptionmenu value="true | false"
Default is false.
If the connect dialog should only have ip, port and ssl/tls option displayed
Syntax:
name=smallconnectdialog value="true | false"
Default is false.
Syntax:
name=tool_bar value="true | false"
Default is true.
Syntax:
name=menu_bar value="true | false"
Default is true.
Syntax:
name=show_fxx value="true | false"
Default is true.
Syntax:
name=color_bg value="#rrggbb"
where
The syntax is the same as used in the HTML language.
Example:
name=color_bg value="#20f030"
Syntax:
name=color_red value="#rrggbb"
name=color_blue value="#rrggbb"
name=color_pink value="#rrggbb"
name=color_green value="#rrggbb"
name=color_turquoise value="#rrggbb"
name=color_yellow value="#rrggbb"
name=color_white value="#rrggbb"
where
The syntax is the same as used in the HTML language.
Syntax:
name=color_select value="#rrggbb"
where
The syntax is the same as used in the HTML language.
Syntax:
name=color_cursor value="#rrggbb"
where
The syntax is the same as used in the HTML language.
Syntax:
name=host value=<a host name>
name=port value=<number>
The host name can either be a name or an Internet
address as 198.66.23.11. There is not a real server at this address!
Syntax:
name=SSL= value="true | false"
Default is false
Syntax:
name=autoconnect= value="true | false"
Default is false
Syntax:
name=27x132 value="true | false"
Default is false
Syntax:
name=font value="font name"
name=fontstyle value="style"
Default is Courier. To see the font names possible to use, start mocha TN5250 in a browser, and select menu - settings - font.
Possible font styles are :Plain,Bold, Italic and Bold Italic.
Syntax:
name=keepalive= value="true | false"
Default is true
Syntax:
name=margin= value="36"
Default is 36
Syntax:
name=devicename value="<a devicename in upper case>"
Syntax:
name=separator= value="true | false"
Default is true
The package includes an example keyboard file keys52, which can be used with parameter "keylayout".
Syntax for file "keys52":
The pc-key's are:
fxx | : xx is 1 .. 24 (function key f1 - f12) |
Fxx | : xx is 1 .. 24 (shift + function key f1 - f12) |
cfxx | : xx is 1 .. 24 (ctrl + function key f1 - f12) |
CFxx | : xx is 1 .. 24 (shift + ctrl + function key f1 - f12) |
HOME | |
END | |
PGUP | |
PGDN | |
ESC | |
RETURN | |
SCROLL | |
PAUSE | |
INSERT | |
CTRL | |
KEYPADPLUS | |
KEYPADMINUS | |
KEYPADENTER |
The 5250 keys are:
pf1 - pf24 | |
insert | |
erase | (erase all input fields) |
record | (record Backspace (Home) |
fieldexit | |
field- | |
field+ | |
pgup | (roll down) |
pgdn | (roll up) |
help | (send help request to the host) |
attn | |
systreq | |
dup | |
clear | (send clear request to the host) |
reset | (reset keyboard) |
enter |
Example of a "keys" file:
# TN5250 keymap # f1 = f1 key , F1 = shift F1 # cf1 = f1 + ctrl CF1 = shift f1 + ctrl # # <pc - key> <5250 key> f1 pf1 f2 pf2 f3 pf3 f4 pf4 f5 pf5 ..
pc-Key 5250-key pc-key 5250-key ----------------------- ----------------------------- f1 PF1 crtl f1 FIELD- f2 PF2 ctrl f2 FIELD+ f3 PF3 ctrl f3 - f4 PF4 ctrl f4 ATTN f5 PF5 ctrl f5 SYSREQ f6 PF6 ctrl f6 INSERT f7 PF7 ctrl f7 ERASE INPUT f8 PF8 ctrl f8 DUP f9 PF9 ctrl f9 - f10 PF10 ctrl f10 - f11 PF11 ctrl f11 - f12 PF12 ctrl f12 - pc-Key 5250-key pc-key 5250-key ----------------------- ----------------------------- shift f1 PF13 crtl shift f1 HELP shift f2 PF14 ctrl shift f2 CLEAR shift f3 PF15 ctrl shift f3 RESET shift f4 PF16 ctrl shift f4 - shift f5 PF17 ctrl shift f5 - shift f6 PF18 ctrl shift f6 - shift f7 PF19 ctrl shift f7 - shift f8 PF20 ctrl shift f8 - shift f9 PF21 ctrl shift f9 - shift f10 PF22 ctrl shift f10 - shift f11 PF23 ctrl shift f11 - shift f12 PF24 ctrl shift f12 -
pc-Key 5250-key ------------------------ HOME RECORD END FIELDEXIT PGUP PGUP PGDN PGDN ESC RESET KEYBOARD RETURN ENTER CTRL RESET KEYPAD PLUS FIELD+ KEYPAD MINUS FIELD- KEYPAD ENTER ENTER
If parameter "license_key" is not given, the program will run in Demo mode, and a session is restricted to 180 seconds