# Javascript: TXTextControl.getActivationState Method

> Gets a value indicating the current activation state. It can be activated, deactivated or disabled.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.getActivationState Method
- **378 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getactivationstate-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getactivationstate-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getactivationstate-method/llms-full.txt

---

### Description

Gets a value indicating the current activation state. It can be activated, deactivated or disabled.

### Syntax

```javascript
<void> TXTextControl.getActivationState(<RequestActivationStateCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | The callback function that receives the requested value. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TXTextControl.getActivationState` in a practical document-editing workflow. It gets a value indicating the current activation state. It can be activated, deactivated or disabled.

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

TXTextControl.getActivationState(
    function(activationState) {
        if (!activationState) {
            console.warn("No activation state was returned.");
            return;
        }
        
        console.log("get activation state result:", activationState);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.FrameStyle Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/framestyle-enumeration/llms-full.txt)
- **Next:** [Javascript: TXTextControl.getAllowDrag Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getallowdrag-method/llms-full.txt)
