mysterious-toddler-20573
03/12/2021, 2:05 PMsend doIt to #messagesthankful-addition-60522
03/12/2021, 2:50 PMthankful-addition-60522
03/12/2021, 2:51 PMgentle-dream-18175
03/12/2021, 3:20 PMmysterious-toddler-20573
03/12/2021, 3:44 PMsalmon-xylophone-28580
03/12/2021, 3:47 PMgentle-dream-18175
03/12/2021, 3:48 PMthankful-addition-60522
03/12/2021, 3:58 PMthankful-addition-60522
03/12/2021, 4:23 PMmysterious-toddler-20573
03/12/2021, 6:28 PMhtml
<tr hx-trigger="click" hx-target="#ic-js-block" hx-get="/media/ajax_preview/aDK1AX1ebVsGDX1XDM3ZtJb9Lo0AnMhzkKrGezd6tm9J5opGE6I1XqJWrMY0s5zjZgaqypTaMQBYVGEmUrqaWxoYZDTb8byMYwYW">
<td>10514</td>
<td>Video</td>
<td><img class="img-thumbnail" src="data:image/jpg;base64,/9j//gAQTGF2YzU4LjkxLjE"></td>
<!-- icon image -->
<td>5b432f9-d7fa-4998-9cce-552b429da22f.mp4</td>
<td>00:01:28.441</td>
<td>400 x 224</td>
<td>23 MB</td>
<td nowrap="nowrap" id="disable-htmx-in-this-td-and-its-children">
<button type="button" name="604b933dbda80" id="604b933dbda80" onclick="window.location.href='/media/edit/10514'" title="Edit"><span class="fa fa-edit "></span> </button>
<button type="button" name="604b933dbdced" id="604b933dbdced" onclick="if (!confirm("Are you sure?")) { return false; } else { window.location.href='/media/delete/10514'; }" title="Delete"><span class="fa fa-trash-alt "></span> </button>
</td>
</tr>mysterious-toddler-20573
03/12/2021, 6:29 PMfast-dream-13257
03/12/2021, 6:29 PMmysterious-toddler-20573
03/12/2021, 6:30 PMmysterious-toddler-20573
03/12/2021, 6:30 PMmysterious-toddler-20573
03/12/2021, 6:31 PMtarget selector
html
<tr hx-trigger="click target::not(button)" ...mysterious-toddler-20573
03/12/2021, 6:32 PMtarget:<css selector> where I think :not(button) is what you want (my css-foo is middlin')user
03/12/2021, 7:40 PM<div id="logs" data-hx-get="/getlogs" data-hx-select="#logs" data-hx-trigger="checkerActualRequest" data-hx-swap="outerHTML">
Here be logs
</div>
<button type="button" data-hx-post="/api/somelongtask" data-hx-target="#target" data-hx-swap="innerHTML">Do Post
</button>
<div id="target"></div>
After I press the button, and after POST request is done and response is recieved, there is also a header in the response:
HX-Trigger: checkerActualRequest
Expecting behavior: #logs container is triggering itself, getting the data into that container. But nothing happens instead. What am I missing?most-jelly-15242
03/12/2021, 7:52 PMcheckerActualRequest is triggered on the document, not on #logs . I think you can make it work with:
data-hx-trigger="checkerActualRequest from:body"user
03/12/2021, 7:58 PMmysterious-toddler-20573
03/12/2021, 7:59 PMmysterious-toddler-20573
03/12/2021, 7:59 PMmysterious-toddler-20573
03/12/2021, 7:59 PMuser
03/12/2021, 8:00 PMuser
03/12/2021, 8:04 PMuser
03/12/2021, 8:08 PMmysterious-toddler-20573
03/12/2021, 8:08 PMuser
03/12/2021, 8:09 PMuser
03/12/2021, 8:10 PMfrom:body modifiers? I thought that just a custom event name would be enough >.<most-jelly-15242
03/12/2021, 8:11 PM