TX Text Control .NET Server

Javascript: HeaderFooter.deactivate Method

Method|Introduced in 28.0

Description

Deactivates the this header or footer.

Syntax

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

Parameters

ParameterDescription
callback

Receives whether the deactivation was succesful.

errorCallback

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

Examples

The following example demonstrates HeaderFooter.deactivate in a practical document-editing workflow. It deactivates the this header or footer.

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

function deactivate(headerFooter) {
    headerFooter.deactivate(
        function(result) {
            if (result) {
                console.log("deactivate is available.");
            } else {
                console.warn("deactivate is not available in the current document state.");
            }
        },
        onTxError
    );
}