# setDuiUrl (Client)

> Takes a dui to another address.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Web interface
- **URL**: https://wiki.mymp.gg/en/setDuiUrl

## Syntax

```lua
bool setDuiUrl(dui dui, string url)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `dui` | `dui` | The dui. |
| `url` | `string` | The new address. |

## Returns

`true` once navigation starts. `false` with an argument that is not a dui (logs a warning).

Until the new address has loaded, `isDuiReady` returns `false`, and `sendDuiMessage` messages not yet delivered are dropped.

## Example

```lua
local dui = createDui("https://example.com", 800, 600)
addCommandHandler("tv", function(_, url)
    setDuiUrl(dui, url)
end)
```

## See also

- [createDui (Client)](https://wiki.mymp.gg/en/createDui.md): Opens a web page off screen, with a transparent background, and gives it back as an image that can be drawn.
- [isDuiReady (Client)](https://wiki.mymp.gg/en/isDuiReady.md): Tells whether a dui's page has finished loading.
