Sets the host cursor location. The host cursor is not the same as the browser's text cursor.

The browser's text cursor () and field focus are not affected by this function.

To set focus to a field in the browser, use the native JavaScript method, Object.focus().


Set Cursor Position to Widget

  • 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




Set Cursor Position to Coordinates

  • rowgreen-screen row to place the host cursor.
  • colgreen-screen column to place the host cursor.

When used with Rich Display File (RDF) widgets, the cursor values are derived from the widget's 'cursor row' and 'cursor column' properties when an RDF widget id is passed. For converted screens, these properties are set to the original screen positions by the DDS Conversion tool.


// Set host cursor position to coordinates (24,1).
setCursor(24, 1);

// Set host cursor position to coordinates of element "D_24_1".

// Set browser focus to element "I_20_5" (place cursor in input field, i.e. textbox, or highlight input widget, i.e. radio button), instead of setting the host cursor directly.