# Javascript: Footnote.scrollTo Method

> Scrolls the beginning of the footnote mark into the visible part of the document using a default position depending on the previous 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.scrollTo Method
- **464 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/scrollto-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/scrollto-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/scrollto-method/llms-full.txt

---

### Description

Scrolls the beginning of the footnote mark into the visible part of the document using a default position depending on the previous position.

### Syntax

```javascript
<void> Footnote.scrollTo([<RequestBooleanCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| 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.scrollTo` in a practical document-editing workflow. It scrolls the beginning of the footnote mark into the visible part of the document using a default position depending on the previous position.

```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.scrollTo(
        function(result) {
            if (result) {
                console.log("scroll to is available.");
            } else {
                console.warn("scroll to is not available in the current document state.");
            }
        },
        onTxError
    );
}, onTxError);
```

---

## Nearby

- **Previous:** [Javascript: Footnote.getReferenceMarkStart Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/getreferencemarkstart-method/llms-full.txt)
- **Next:** [Javascript: Footnote.scrollToPosition Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/footnote/scrolltoposition-method/llms-full.txt)
