ripe-action-67367
12/05/2022, 8:18 AMvalue
is not a valid div attributeancient-father-3063
12/05/2022, 8:20 AMancient-father-3063
12/05/2022, 8:21 AMripe-action-67367
12/05/2022, 8:23 AMso my backend can recognize it as coming from this page
, sounds awfully like HX-Current-URL
header https://htmx.org/reference/#request_headersminiature-lizard-24702
12/05/2022, 8:30 AMminiature-lizard-24702
12/05/2022, 8:30 AMminiature-lizard-24702
12/05/2022, 8:31 AMminiature-lizard-24702
12/05/2022, 8:31 AMminiature-lizard-24702
12/05/2022, 8:31 AMancient-father-3063
12/05/2022, 8:41 AMancient-father-3063
12/05/2022, 8:42 AMhx-headers="HX-Current-URL"
or how to format this?ripe-action-67367
12/05/2022, 8:44 AMripe-action-67367
12/05/2022, 8:46 AMancient-father-3063
12/05/2022, 8:53 AMboundless-queen-37046
12/05/2022, 1:47 PMmysterious-toddler-20573
12/05/2022, 4:05 PMhtmx:afterSettle
should run after all the script elements are evaluated: https://htmx.org/events/#htmx:afterSettlehandsome-window-77114
12/05/2022, 7:06 PMmysterious-toddler-20573
12/05/2022, 7:26 PMsome-airline-73512
12/05/2022, 7:37 PMhtml
<div id="content">Content</div>
<table>
<thead>
<tr>
<td>Column</td>
</tr>
</thead>
<tbody id="tbody">
<tr>
<td>1</td>
</tr>
</tbody>
</table>
<button hx-post="/ex/select-oob" hx-target="#content" hx-select="#content" hx-select-oob="#tbody">Click me</button>
Ajax response:
html
<div id="content">Replaced</div>
<tbody id="tbody">
<tr>
<td>2</td>
</tr>
</tbody>
This replaces #content, but doesn't replace #tbody.mysterious-toddler-20573
12/05/2022, 7:44 PMmysterious-toddler-20573
12/05/2022, 7:45 PMhtmx.config.useTemplateFragments
mysterious-toddler-20573
12/05/2022, 7:45 PMtrue
mysterious-toddler-20573
12/05/2022, 7:45 PMsome-airline-73512
12/05/2022, 7:47 PMsome-airline-73512
12/05/2022, 7:52 PMhtml
<meta name="htmx-config" content='{"useTemplateFragments":true}'>
This works:
html
<button hx-post="/ex/select-oob" hx-target="#tbody" hx-select-
oob="#content">Click me</button>
This doesn't:
html
<button hx-post="/ex/select-oob" hx-target="#content" hx-select="#content" hx-select-oob="#tbody">Click me</button>
some-airline-73512
12/05/2022, 7:53 PMhtml
<button hx-post="/ex/select-oob" hx-target="#tbody" hx-select-oob="#content">Click me</button>
This doesn't:
html
<button hx-post="/ex/select-oob" hx-target="#tbody" hx-select="#tbody" hx-select-oob="#content">Click me</button>
handsome-window-77114
12/05/2022, 8:15 PMhandsome-window-77114
12/05/2022, 10:37 PMsome-airline-73512
12/06/2022, 3:54 AMmysterious-toddler-20573
12/06/2022, 4:38 AM