TX Text Control .NET Server

Javascript: HeaderFooter.getConnectedToPrevious Method

Method|Introduced in 28.0

Description

Gets a value specifying whether the header or footer is connected with the header or footer of the previous section. If headers or footers are connected, they have always the same contents.

Syntax

<void> HeaderFooter.getConnectedToPrevious(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives whether the header or footer is connected with the header or footer of the previous section.

errorCallback

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

Examples

The following example demonstrates HeaderFooter.getConnectedToPrevious in a practical document-editing workflow. It gets a value specifying whether the header or footer is connected with the header or footer of the previous section. If headers or footers are connected, they have always the same contents.

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

function inspectConnectedToPrevious(headerFooter) {
    headerFooter.getConnectedToPrevious(
        function(result) {
            if (result) {
                console.log("get connected to previous is available.");
            } else {
                console.warn("get connected to previous is not available in the current document state.");
            }
        },
        onTxError
    );
}