# Javascript: BarcodeFrame.refresh Method

> Refreshes the barcode.

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

---

### Description

Refreshes the barcode.

### Syntax

```javascript
<void> BarcodeFrame.refresh([<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `BarcodeFrame.refresh` in a practical document-editing workflow. Refreshes the barcode.

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

function refresh(barcodeFrame) {
    barcodeFrame.refresh(
        function() {
            console.log("refresh completed.");
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: BarcodeFrame.barcode Property](https://docs.textcontrol.com/ds-server/reference/javascript/barcodeframe/barcode-property/llms-full.txt)
- **Next:** [BarcodeTypeSettings Object](https://docs.textcontrol.com/ds-server/reference/javascript/barcodetypesettings/llms-full.txt)
