Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

This function sets the host cursor location.  The browser cursor and field focus is not affected by this function.  To set focus to a field in the browser, use the native .focus() method.

Parameters:

  • row, col or widget id - green-screen row and column to place the cursor in, or alternatively the id of the element to derive the row and column from

Examples:

Code Block
javascript
javascript
// Use row and column to set the host cursor location
setCursor(24, 1);
pressKey('F1');
Code Block
javascript
javascript
// Use element id to set the host cursor
setCursor("D_24_1");
pressKey('F1');
Code Block
javascript
javascript
// Set the browser cursor & focus field instead of the host cursor directly
getObj("I_20_5").focus();

Note:

When used on Rich Display File widgets, the cursor values are derived from the widget's 'cursor row' and 'cursor column' properties if a widget id is passed. These properties are set to the original screen positions when a green screen is converted by the DDS Conversion tool.