# Javascript: Signatures.setSubmitCallback Method

> Registers a callback for the signing response. When a redirect URL is configured, request failures are passed to the callback as well.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 30.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API - Document Viewer > Javascript: Signatures.setSubmitCallback Method
- **268 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript-document-viewer/signatures/setsubmitcallback-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript-document-viewer/signatures/setsubmitcallback-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript-document-viewer/signatures/setsubmitcallback-method/llms-full.txt

---

### Description

Registers a callback for the signing response. When a redirect URL is configured, request failures are passed to the callback as well.

### Syntax

```javascript
<void> Signatures.setSubmitCallback(<SignatureSubmitCallback> callback)
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Handler invoked with the signing response. |

### Return Value

Registers a callback for the signing response. When a redirect URL is configured, request failures are passed to the callback as well.

### Examples

The following example demonstrates `signatures.setSubmitCallback` in a practical Document Viewer workflow. Sets a callback function which will be invoked when the document is submitted.

```javascript
TXDocumentViewer.signatures.setSubmitCallback(function(signedDocument) {
    console.log("Signed document received:", signedDocument);
});
```

---

## Nearby

- **Previous:** [Javascript: Signatures.setCustomSigning Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript-document-viewer/signatures/setcustomsigning-method/llms-full.txt)
- **Next:** [Javascript: Signatures.startSigningProcess Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript-document-viewer/signatures/startsigningprocess-method/llms-full.txt)
