Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This function sets the host cursor location.  The browser cursor and field focus is Sets the host cursor location. The host cursor is not the same as the browser's text cursor.

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

...


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

...

.

Parameters

...

Section


Column
width400px

Set Cursor Position to Widget

  • widget idgreen-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
javascriptjavascript // Use row and column to set the host cursor location
Column
width50px

~

OR

~


Column
width100%

Set Cursor Position to Coordinates

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



Note
titleCursor Row and Cursor Column Properties of RDF Widgets
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.

Examples

Code Block
languagejs
titleSet Host Cursor Position to Row and Column
// Set host cursor position to coordinates (24,1).
setCursor(24, 1);
pressKey('F1');


// Use element id to set the host cursor
Code Block
languagejavascriptjavascript
js
titleSet Host Cursor Position to Row and Column of an Element
// Set host cursor position to coordinates of element "D_24_1".
setCursor("D_24_1");
pressKey('F1');


Code Block
languagejsjavascriptjavascript
titleUse focus() Method to Set Browser Focus
// Set the browserbrowser focus to element "I_20_5" (place cursor &in focusinput field, i.e. textbox, or highlight input widget, i.e. radio button), instead of setting the host cursor directly.
getObj("I_20_5").focus();

Note:

...