TX Text Control .NET Server

Javascript: TextFrame.getName Method

Method|Introduced in 28.0

Description

Gets the name for the frame. An empty string indicates that the frame has no name.

Syntax

<void> TextFrame.getName(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the current property value.

errorCallback

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

Examples

The following example demonstrates TextFrame.getName in a practical document-editing workflow. It gets the name for the frame. An empty string indicates that the frame has no name.

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

function inspectName(textFrame) {
    textFrame.getName(
        function(result) {
            console.log("get name result:", result);
        },
        onTxError
    );
}