# Javascript: Footnote.getID Method

> Gets a user-defined identifier. It must be a one-based value. A value of zero indicates that the footnote has no identifier.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 32.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: Footnote.getID Method
- **394 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/getid-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/getid-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/getid-method/llms-full.txt

---

### Description

Gets a user-defined identifier. It must be a one-based value. A value of zero indicates that the footnote has no identifier.

### Syntax

```javascript
<void> Footnote.getID(<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.getID` in a practical document-editing workflow. It gets a user-defined identifier. It must be a one-based value. A value of zero indicates that the footnote has no identifier.

```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.getID(
        function(result) {
            console.log("get id result:", result);
        },
        onTxError
    );
}, onTxError);
```

---

## Nearby

- **Previous:** [Javascript: Footnote.getHighlightMode Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/gethighlightmode-method/llms-full.txt)
- **Next:** [Javascript: Footnote.getName Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/getname-method/llms-full.txt)
