tall-dinner-62086
09/23/2022, 9:41 AMtall-dinner-62086
09/23/2022, 9:41 AMproud-librarian-99598
09/23/2022, 9:42 AMproud-librarian-99598
09/23/2022, 9:43 AMtall-dinner-62086
09/23/2022, 9:44 AMstocky-dentist-80693
09/23/2022, 9:44 AMproud-librarian-99598
09/23/2022, 9:48 AMproud-librarian-99598
09/23/2022, 9:49 AMtall-dinner-62086
09/23/2022, 10:01 AMstocky-dentist-80693
09/23/2022, 10:02 AMif (not_logged_in() && is_htmx()) { header("HX-Refresh"); exit(); }
?proud-librarian-99598
09/23/2022, 10:12 AMHX-Refresh: true
and now everything worksproud-librarian-99598
09/23/2022, 10:12 AMpolite-oil-80202
09/23/2022, 10:50 AMtall-dinner-62086
09/23/2022, 10:53 AMpolite-oil-80202
09/23/2022, 10:56 AMtall-dinner-62086
09/23/2022, 10:57 AMtall-dinner-62086
09/23/2022, 10:57 AMpolite-oil-80202
09/23/2022, 11:00 AMtall-dinner-62086
09/23/2022, 11:02 AMhx-push-url
?polite-oil-80202
09/23/2022, 11:03 AMvictorious-addition-87840
09/23/2022, 11:36 AMvictorious-addition-87840
09/23/2022, 11:37 AMvictorious-addition-87840
09/23/2022, 11:37 AMgifted-appointment-5037
09/23/2022, 11:38 AM_="on htmx:afterOnLoad ..."
The input clearing code is
<form
hx-post="/todos"
hx-target="#todo-list"
hx-swap="afterbegin"
_="on htmx:afterOnLoad set #txtTodo.value to ''"
>
<input
class="new-todo"
id="txtTodo"
name="todo"
placeholder="What needs to be done?"
autofocus=""
/>
</form>
and the row deleting code is
<button
class="destroy"
hx-delete="/todos/{{id}}"
_="on htmx:afterOnLoad remove #todo-{{id}}"
></button>
What have I missed? (there's no errors in the console)broad-pencil-64390
09/23/2022, 11:43 AMmysterious-toddler-20573
09/23/2022, 12:55 PMmysterious-toddler-20573
09/23/2022, 12:56 PMmysterious-toddler-20573
09/23/2022, 12:58 PMgifted-appointment-5037
09/23/2022, 1:04 PM