bumpy-kangaroo-60192
01/29/2023, 9:00 PMbumpy-kangaroo-60192
01/29/2023, 9:02 PMmysterious-toddler-20573
01/29/2023, 9:02 PMmysterious-toddler-20573
01/29/2023, 9:03 PMmysterious-toddler-20573
01/29/2023, 9:04 PMmysterious-toddler-20573
01/29/2023, 9:04 PMsparse-traffic-23652
01/29/2023, 9:54 PMbumpy-kangaroo-60192
01/29/2023, 9:59 PMsparse-traffic-23652
01/29/2023, 10:21 PMsparse-traffic-23652
01/29/2023, 10:28 PMagreeable-apartment-19546
01/30/2023, 2:10 AMhx-get
against a dynamic URL based on other page content ?
hx-get="/html/maps/" + document.getElementById("name").value
agreeable-apartment-19546
01/30/2023, 2:11 AMmysterious-toddler-20573
01/30/2023, 2:12 AMhtmx:configRequest
event and update the event.detail.path
agreeable-apartment-19546
01/30/2023, 2:13 AMconfigRequest
again. Thanks ! Will look at doing that. Amazing you can intercept a request and dynamically change where it's hittingsome-airline-73512
01/30/2023, 8:10 AMbrainy-zoo-88281
01/30/2023, 10:27 AMrich-coat-84078
01/30/2023, 1:14 PMmysterious-toddler-20573
01/30/2023, 1:47 PMrich-coat-84078
01/30/2023, 2:05 PMrefined-waiter-90422
01/30/2023, 2:11 PMmysterious-toddler-20573
01/30/2023, 2:12 PMmysterious-toddler-20573
01/30/2023, 2:12 PMmysterious-toddler-20573
01/30/2023, 2:14 PMgorgeous-airport-54386
01/30/2023, 2:17 PMrich-coat-84078
01/30/2023, 2:18 PMrich-coat-84078
01/30/2023, 2:34 PM<div
hx-get="catalog/list"
hx-trigger="product_row_action from:body"
>
{% block product_row %}
<div row 1>...
<div row 2>...
<div row 3>...
{% endblock%}
</div>
when i do create an item, i can add a new row here using {% block product_row %}
with **HX-Trigger Response Headers** = 'product_row_action'
which i embed in the response. but when i do update, i need to do hx-get="catalog/list"
instead of hx-get="catalog/list"
like hx-get="catalog/list/1"
add url parameter. in this case i want to send the hx-get url with header. i want to send the new url with **HX-Get response header**
like HX-Trigger Response Headers for example. i don't know how to explain it. but i need to make the hx-get url variable somehow. i can do it with javascript, but i'm trying to solve it with htmx's methods.adventurous-ocean-93733
01/30/2023, 2:50 PMgorgeous-airport-54386
01/30/2023, 3:02 PMhtml
{% block product_row %}
<div hx-get="catalog/list/1" hx-trigger="product_row_action[/* check if the action is an update */] from:body">...
<div hx-get="catalog/list/2" hx-trigger="product_row_action[/* check ...>
{% endblock%}
May not fit all use cases thoughgorgeous-airport-54386
01/30/2023, 3:03 PMlively-waitress-29714
01/30/2023, 3:33 PMhx-preserve="true"
to the spinner's div. I'm failing to replicate that, hx-preserve doesn't seem to work for me at all. As a test, my server simply returns (surrounded by loading basic css and js)
<div hx-get="test2" hx-trigger="every 1s">
<div id="my-spinner" hx-preserve="true" class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
The endpoint test2
in turn returns the same content without the surrounding <div hx-get.. hx-trigger..>
. On every reload, the spinner is interrupted and starts again, ignoring the hx-preserve. I tried different html versions from 1.5.0 to the most recent one without success. What am I missing?