# Javascript: Footnote.scrollToPosition Method

> Scrolls the beginning of the footnote mark into the visible part of the document using the specified position.

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

---

### Description

Scrolls the beginning of the footnote mark into the visible part of the document using the specified position.

### Syntax

```javascript
<void> Footnote.scrollToPosition(<InputPosition.ScrollPosition> scrollPosition, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| scrollPosition | Specifies the position to scroll to. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `Footnote.scrollToPosition` in a practical document-editing workflow. It scrolls the beginning of the footnote mark into the visible part of the document using the specified position.

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

function scrollToPosition(scrollPosition) {
    TXTextControl.footnotes.elementAt(0, function(footnote) {
        if (!footnote) {
            console.warn("No footnote is available.");
            return;
        }
    
        footnote.scrollToPosition(
            scrollPosition,
            function() {
                console.log("scroll to position completed.");
            },
            onTxError
        );
    }, onTxError);
}
```

---

## Nearby

- **Previous:** [Javascript: Footnote.scrollTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/scrollto-method/llms-full.txt)
- **Next:** [Javascript: Footnote.setHighlightColor Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/sethighlightcolor-method/llms-full.txt)
