Previous Topic: Examples

Next Topic: Examples

Command key buttons

Each command key is created in the HTML skeleton or in a JIT page as a button, for example:

<button type="submit" id="_KEN" class="cmdkey" onclick="name=id">Enter</button>

If a button is created to simulate.

Where button-text is the text that appears on the button face itself (for instance, Cancel or Select for processing), nn is a 2-letter code for the relevant command key, and xxxx is the (optional) cursor position on the screen when the command key is pressed.

For generated skeletons, the button text is taken from the DDS source; for JIT screens, it is taken directly from the 5250 screen. The available 2-letter command-key codes are as follows:

01-24-Relevant F-key
EN-Enter
HL-Help
CL-Clear
UP-Page Up
DN-Page Down
PR-Print

If required, the button can include a cursor position on the screen when the command key is pressed, by including it in the button id, as follows:

<button type="submit" id="_K04xxxx" class="cmdkey" onclick="name=id">Prompt</button>
xxxx

Specifies the cursor offset to be sent to Web Option when this button is pressed. This allows you to create buttons that simulate pressing, for example, F4, with the cursor positioned at a specific input field.

If the cursor position is not specified, Web Option assumes that the cursor is positioned at the first input field (this is consistent with green-screen processing). If cursor position is specified, the Web Option router sends both the relevant command key and the cursor position to the IBM i.

Although both the HTML generator and the JIT processor create buttons to provide the same basic functionality as would be available on the green-screen, you can add additional button definitions to generated HTML skeletons to gain further functionality than the HTML generator can provide (such as cursor-specific buttons).