# RequestDirectionCallback Function

> Callback function for requests expecting a writing direction value.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Function
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > RequestDirectionCallback Function
- **236 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/requestdirectioncallback/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/requestdirectioncallback/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/requestdirectioncallback/llms-full.txt

---

### Description

Callback function for requests expecting a writing direction value.

### Syntax

```javascript
function(<Direction> direction)
```

### Examples

The following example demonstrates `RequestDirectionCallback` in a practical document-editing workflow. Callback function for requests expecting a writing direction value.

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

function requestDirectionCallback(direction) {
    console.log("direction:", direction);
}

TXTextControl.paragraphFormat.getDirection(requestDirectionCallback, onTxError);
```

---

## Nearby

- **Previous:** [RequestDateFormFieldCallback Function](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/requestdateformfieldcallback/llms-full.txt)
- **Next:** [RequestDistancesCallback Function](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/requestdistancescallback/llms-full.txt)
