This example uses B4X,
Output:
- specifically MiniHTML library
- cross over HTMX to generate interactive HTML
- based on Modal Dialogs in Bootstrap example on HTMX website
- to demonstrate mix usage of HTMX and Bootstrap 5 javascript
- served by B4J server through helper functions from WebApiUtils v3 library.
B4X:
Button.Text("Open Modal") _
.hxGet("/modal") _
.hxTarget("#modals-here") _
.hxTrigger("click") _
.attribute2(CreateMap("data-bs-toggle": "modal", "data-bs-target": "#modals-here")) _
.addClass("btn btn-primary text-uppercase") _
.up(div2)
Output:
B4X:
<button hx-get="/modal" hx-target="#modals-here" hx-trigger="click" data-bs-toggle="modal" data-bs-target="#modals-here" class="btn btn-primary text-uppercase">Open Modal</button>
Attachments
Last edited: