Click to Load

Name Email ID
Agent Smith void10@null.org 50ae608b-8659-4e09-aca1-475931a85bf0
Agent Smith void11@null.org 2ddda44d-47d7-4e1f-9c6c-fac5a606f2be
Agent Smith void12@null.org 2a6228c0-9455-489d-bc96-2b7410fa9464
Agent Smith void13@null.org 46362b1c-331a-4324-be96-0f5aeceb76ed
Agent Smith void14@null.org a8cacb6c-cf18-405d-95de-0b2088013265
Agent Smith void15@null.org 82851b1b-bb6f-4400-a477-a4cbb272c202
Agent Smith void16@null.org 95dfda73-dfd6-4ed5-a6b6-70f498684173
Agent Smith void17@null.org c928cca5-96b5-445c-bb9c-535b744f78d4
Agent Smith void18@null.org 04b49ad5-b248-47ec-9930-d3d05817db2b
Agent Smith void19@null.org fa75eb15-4984-441e-bcc1-faf1a46a2ee3

This example shows how to implement click-to-load the next page in a table of data. The crux of the demo is the final row:

<tr id="replaceMe">
  <td colspan="3">
    <button class='btn primary' hx-get="rows.jsp?page=2"
                        hx-target="#replaceMe"
                        hx-swap="outerHTML">
         Load More Agents... <img class="htmx-indicator" src="images/bars.svg">
    </button>
  </td>
</tr>

This row contains a button that will replace the entire row with the next page of results (which will contain a button to load the next page of results). And so on.