# Javascript: Selection.getStart Method

> Gets the starting point of selected text.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: Selection.getStart Method
- **289 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selection/getstart-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selection/getstart-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selection/getstart-method/llms-full.txt

---

### Description

Gets the starting point of selected text.

### Syntax

```javascript
<void> Selection.getStart(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the starting point of selected text. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `Selection.getStart` in a practical document-editing workflow. It gets the starting point of selected text.

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

TXTextControl.selection.getStart(
    function(result) {
        console.log("get start result:", result);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: Selection.getLength Method](https://docs.textcontrol.com/ds-server/reference/javascript/selection/getlength-method/llms-full.txt)
- **Next:** [Javascript: Selection.getStrikeout Method](https://docs.textcontrol.com/ds-server/reference/javascript/selection/getstrikeout-method/llms-full.txt)
