Hi, I'm new to htmx - and coding in general, - and find myself having some difficulties understanding how the syntax works with events.
I'm currently working on allowing users to edit their page on my app, and I'd like to have an "edit saved" appear briefly each time a field has been edited.
I thought of using "htmx:afterRequest" [
https://htmx.org/events/#htmx:afterRequest] to show that the edit has been saved when the response has a 20x status code, or else that there was an error. But I cannot work my head around how to approach the syntax of that
So, my question:
How would you use "htmx:afterRequest" if you would like to add a message to a div #requestresult if detail.succesful=true or detail.failed=true ?