Custom Dialogs
The hx-confirm attribute specifies a question to display in a browser-supplied confirmation dialog (using the Window method confirm) before an HTTP request is sent. The dialog contains OK and Cancel buttons. The request is only sent if the user clicks the OK button.
The hx-prompt attribute specifies a prompt to display in a browser-supplied prompt dialog (using the Window method prompt) before an HTTP request is sent. The dialog contains a text input and OK and Cancel buttons. The request is only sent if the user clicks the OK button. The request header HX-Prompt holds the value the user entered in the text input.
The browser-supplied dialogs cannot be styled and have default styling that’s unlikely to match the design of your ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access