DS Server

Javascript: Footnote.getName Method

Method|Introduced in 32.0

Description

Gets the footnote's name. An empty string indicates that the footnote has no name.

Syntax

<void> Footnote.getName(<RequestStringCallback> 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.getName in a practical document-editing workflow. It gets the footnote's name. An empty string indicates that the footnote has no name.

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.getName(
        function(result) {
            console.log("get name result:", result);
        },
        onTxError
    );
}, onTxError);