Click to Load

Name Email ID
Agent Smith void10@null.org 74712adf-a320-43d4-a170-30e0683021aa
Agent Smith void11@null.org 8048975b-bb82-473f-a678-c52358d8b188
Agent Smith void12@null.org bca25330-7dad-42e7-b5c7-a99415fa8ca2
Agent Smith void13@null.org e98a1c4c-c70a-4682-a48a-d17b81e9f9e8
Agent Smith void14@null.org 58988eed-db13-40f8-be30-6c1725c843f4
Agent Smith void15@null.org 4b81922e-557f-4c3d-a20f-b7e0825054b7
Agent Smith void16@null.org 27d756f8-8cc8-48d6-9bb7-c1f63c1848e8
Agent Smith void17@null.org 266421ed-dc3e-4810-832c-78d089281a34
Agent Smith void18@null.org 33e84069-babf-489e-bcd4-cfcf456206c5
Agent Smith void19@null.org 3e262384-fdf1-4f8c-9d56-576f58061d56

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.