Click to Load

Name Email ID
Agent Smith void10@null.org 8d3a168a-a875-4f57-bdb2-6a4c9f8d9118
Agent Smith void11@null.org 00423414-e256-497e-870c-a70b5285a2ca
Agent Smith void12@null.org 874896b4-fa22-4d9c-a559-5c63f779d94c
Agent Smith void13@null.org 12fcff30-07c6-4037-a60d-a4388c3f972a
Agent Smith void14@null.org 7f493d66-fef2-45d5-834d-58e9d0a0a608
Agent Smith void15@null.org 82cd0d57-4aa1-4179-9210-20c75bcb756d
Agent Smith void16@null.org 15988edd-eb10-4a6a-98f1-f9bdc1a19fd6
Agent Smith void17@null.org 87ff049a-e504-473b-8c7a-792120ca84aa
Agent Smith void18@null.org e01eafb2-fb88-4a0e-9235-2fd456873157
Agent Smith void19@null.org ac4663a9-da08-4ef0-870b-86f89aecaae4

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.