DS Server

Javascript: Footnote.getID Method

Method|Introduced in 32.0

Description

Gets a user-defined identifier. It must be a one-based value. A value of zero indicates that the footnote has no identifier.

Syntax

<void> Footnote.getID(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the property value.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates Footnote.getID in a practical document-editing workflow. It gets a user-defined identifier. It must be a one-based value. A value of zero indicates that the footnote has no identifier.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.footnotes.elementAt(0, function(footnote) {
    if (!footnote) {
        console.warn("No footnote is available.");
        return;
    }

    footnote.getID(
        function(result) {
            console.log("get id result:", result);
        },
        onTxError
    );
}, onTxError);