# Javascript: TXTextControl.setInputPositionByLocation Method

> Sets a new input position from a geometric location.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 30.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.setInputPositionByLocation Method
- **379 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setinputpositionbylocation-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setinputpositionbylocation-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setinputpositionbylocation-method/llms-full.txt

---

### Description

Sets a new input position from a geometric location.

### Syntax

```javascript
<void> TXTextControl.setInputPositionByLocation(<Point> location, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| location | Specifies a geometric location. The point must be specified in twips with an origin at the top left corner of the control. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TXTextControl.setInputPositionByLocation` in a practical document-editing workflow. It sets a new input position from a geometric location.

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

TXTextControl.setInputPositionByLocation(
    { x: 1440, y: 720 },
    function() {
        console.log("set input position by location completed.");
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.setFormulaReferenceStyle Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setformulareferencestyle-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.setInputPositionByPage Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setinputpositionbypage-method/llms-full.txt)
