findNthElement (NotesRichTextNavigator - JavaScript)

Moves the current position to the element at a specified position within elements of the same type.

Defined in

NotesRichTextNavigator

Syntax

findNthElement(type:int) : boolean

findNthElement(type:int, occurrence:int) : boolean

Parameter Description
int type
  • RichTextItem.RTELEM_TYPE_DOCLINK
  • RichTextItem.RTELEM_TYPE_FILEATTACHMENT
  • RichTextItem.RTELEM_TYPE_OLE
  • RichTextItem.RTELEM_TYPE_SECTION
  • RichTextItem.RTELEM_TYPE_TABLE
  • RichTextItem.RTELEM_TYPE_TABLECELL
  • RichTextItem.RTELEM_TYPE_TEXTPARAGRAPH
  • RichTextItem.RTELEM_TYPE_TEXTRUN
int occurrence The position of the element within elements of the same type in the rich text item. Must be a positive integer. Defaults to 1.
Return value Description
boolean
  • true if the element exists and the current pointer is reset
  • false if the element does not exist and the current pointer is not reset

Usage

This method returns false if the specified position does not exist.

You can use this method as a basis for future navigation, for example, with findNextElement if the occurrence is explicitly specified.