# Javascript: InputPosition.getPageInSection Method

> Gets the page number in the section containing the current text input position.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: InputPosition.getPageInSection Method
- **319 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/inputposition/getpageinsection-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/inputposition/getpageinsection-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/inputposition/getpageinsection-method/llms-full.txt

---

### Description

Gets the page number in the section containing the current text input position.

### Syntax

```javascript
<void> InputPosition.getPageInSection(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the page number in the section containing the current text input position. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `InputPosition.getPageInSection` in a practical document-editing workflow. It gets the page number in the section containing the current text input position.

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

TXTextControl.inputPosition.getPageInSection(
    function(result) {
        console.log("get page in section result:", result);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: InputPosition.getPage Method](https://docs.textcontrol.com/ds-server/reference/javascript/inputposition/getpage-method/llms-full.txt)
- **Next:** [Javascript: InputPosition.getSection Method](https://docs.textcontrol.com/ds-server/reference/javascript/inputposition/getsection-method/llms-full.txt)
