# Javascript: Footnote.getNumber Method

> Gets the footnote's number in the text. The first footnote in the document has the number 1. The number is defined through the textflow.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 32.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: Footnote.getNumber Method
- **403 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/footnote/getnumber-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/footnote/getnumber-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/footnote/getnumber-method/llms-full.txt

---

### Description

Gets the footnote's number in the text. The first footnote in the document has the number 1. The number is defined through the textflow.

### Syntax

```javascript
<void> Footnote.getNumber(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `Footnote.getNumber` in a practical document-editing workflow. It gets the footnote's number in the text. The first footnote in the document has the number 1. The number is defined through the textflow.

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

TXTextControl.footnotes.elementAt(0, function(footnote) {
    if (!footnote) {
        console.warn("No footnote is available.");
        return;
    }

    footnote.getNumber(
        function(result) {
            console.log("get number result:", result);
        },
        onTxError
    );
}, onTxError);
```

---

## Nearby

- **Previous:** [Javascript: Footnote.getName Method](https://docs.textcontrol.com/ds-server/reference/javascript/footnote/getname-method/llms-full.txt)
- **Next:** [Javascript: Footnote.getReferenceMarkLength Method](https://docs.textcontrol.com/ds-server/reference/javascript/footnote/getreferencemarklength-method/llms-full.txt)
