Javascript: HeaderFooter.setConnectedToPrevious Method
Description
Sets 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.setConnectedToPrevious(<boolean> connectedToPrevious, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| connectedToPrevious | Specifies whether the header or footer is connected with the header or footer of the previous section. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates HeaderFooter.setConnectedToPrevious in a practical document-editing workflow. It sets 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 configureConnectedToPrevious(headerFooter) {
headerFooter.setConnectedToPrevious(
true,
function() {
console.log("set connected to previous completed.");
},
onTxError
);
}