Javascript: HeaderFooter.deactivate Method
Description
Deactivates the this header or footer.
Syntax
<void> HeaderFooter.deactivate(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| 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
);
}