# SideBarTypeRequestCallback Function

> Callback function for requests expectiong a SideBarType value.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Function
- **Introduced:** 30.0
- **Path:** DS Server > Reference > JavaScript API > SideBarTypeRequestCallback Function
- **255 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/sidebartyperequestcallback/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/sidebartyperequestcallback/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/sidebartyperequestcallback/llms-full.txt

---

### Description

Callback function for requests expectiong a [SideBarType](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/sidebartype-enumeration/llms-full.txt) value.

### Syntax

```javascript
function(<SideBarType> sideBarType)
```

### Examples

The following example demonstrates `SideBarTypeRequestCallback` in a practical document-editing workflow. Callback function for requests expectiong a SideBarType value.

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

function sideBarTypeRequestCallback(sideBarType) {
    console.log("side bar type:", sideBarType);
}

TXTextControl.sideBarToggleButton.getAllowedSideBars(sideBarTypeRequestCallback, onTxError);
```

---

## Nearby

- **Previous:** [Javascript: SideBarToggleButton.setCurrentSideBar Method](https://docs.textcontrol.com/ds-server/reference/javascript/sidebartogglebutton/setcurrentsidebar-method/llms-full.txt)
- **Next:** [SignatureField Object](https://docs.textcontrol.com/ds-server/reference/javascript/signaturefield/llms-full.txt)
