# AddFootnoteCallback Function

> Callback function for functions which add a footnote.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Function
- **Introduced:** 32.0
- **Path:** DS Server > Reference > JavaScript API > AddFootnoteCallback Function
- **255 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/addfootnotecallback/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/addfootnotecallback/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/addfootnotecallback/llms-full.txt

---

### Description

Callback function for functions which add a footnote.

### Syntax

```javascript
function(<FootnoteCallbackData> response)
```

### Examples

The following example demonstrates `AddFootnoteCallback` in a practical document-editing workflow. Callback function for functions which add a footnote.

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

function addFootnoteCallback(response) {
    console.log("response:", response);
}

TXTextControl.footnotes.add("Quarterly report", "PaymentTerms", 25, addFootnoteCallback, onTxError);
```

---

## Nearby

- **Previous:** [AddEditableRegionCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/addeditableregioncallback/llms-full.txt)
- **Next:** [AddSubTextPartCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/addsubtextpartcallback/llms-full.txt)
