> For the complete documentation index, see [llms.txt](https://docs.goless.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goless.com/blocks/browser/handle-dialog-block.md).

# Handle Dialog Block

<figure><img src="/files/lxn21ANJ3i05GkdlXbQd" alt=""><figcaption></figcaption></figure>

This block accepts or rejects a dialogue launched by a JS (alert, confirmation, prompt, or onbeforeunload). You must use this block prior to the dialog box appearing. For instance, when a dialogue box appears after clicking on an element.

<figure><img src="/files/rNHE8GDv4xG4S2CovsCI" alt=""><figcaption></figcaption></figure>

* **Accept dialog.** Accept or reject the dialog prompt.
* **Prompt text.** This is the text to enter into the dialog prompt before accepting. It is used only in a prompt dialog box.
