# Javascript: MisspelledWordCollection.getItemAtLocation Method

> Gets the misspelled word at a certain geometrical location. If there is no misspelled word, null is returned.

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

---

### Description

Gets the misspelled word at a certain geometrical location. If there is no misspelled word, null is returned.

### Syntax

```javascript
<void> MisspelledWordCollection.getItemAtLocation(<number> x, <number> y, <RequestMisspelledWordCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| x | Horizontal location. |
| y | Vertical location. |
| callback | Receives the misspelled word. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `MisspelledWordCollection.getItemAtLocation` in a practical document-editing workflow. It gets the misspelled word at a certain geometrical location. If there is no misspelled word, null is returned.

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

function inspectItemAtLocation(misspelledWords) {
    misspelledWords.getItemAtLocation(
        1,
        1,
        function(result) {
            if (!result) {
                console.warn("No misspelled word was returned.");
                return;
            }
            
            console.log("get item at location result:", result);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: MisspelledWordCollection.getItemAtInputPosition Method](https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/getitematinputposition-method/llms-full.txt)
- **Next:** [Javascript: MisspelledWordCollection.getItemAtTextPosition Method](https://docs.textcontrol.com/ds-server/reference/javascript/misspelledwordcollection/getitemattextposition-method/llms-full.txt)
