# Javascript: DocumentSettings.getDocumentBasePath Method

> Gets a file path that is used to search for resources like images or hypertext links.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 29.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: DocumentSettings.getDocumentBasePath Method
- **315 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getdocumentbasepath-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getdocumentbasepath-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getdocumentbasepath-method/llms-full.txt

---

### Description

Gets a file path that is used to search for resources like images or hypertext links.

### Syntax

```javascript
<void> DocumentSettings.getDocumentBasePath(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

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

### Examples

The following example demonstrates `DocumentSettings.getDocumentBasePath` in a practical document-editing workflow. It gets a file path that is used to search for resources like images or hypertext links.

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

TXTextControl.documentSettings.getDocumentBasePath(
    function(result) {
        console.log("get document base path result:", result);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: DocumentSettings.getCreatorApplication Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getcreatorapplication-method/llms-full.txt)
- **Next:** [Javascript: DocumentSettings.getDocumentKeywords Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getdocumentkeywords-method/llms-full.txt)
