Call htmx:after-on-load after successful hx-post
I have a form in a boostrap modal that I am posting with HTMX. The post is working great and so is validation. The problem is the successful submit response. I am returning ASP.NET MVC Ok(); method which returns 200.
Clear target innerHTML using HTMX
I have a Boostrap modal that I want to reuse. I pop it up with a different VendorId each time. I want to be able to clear the modal body before the HTMX AJAX (hx-get) is complete, so the old HTML from the previous Vendor ID does not show during the HTMX request.
HTMX scroll position not restored on history back
When I click on a hx-boosted anchor tag and get pushed to the next page and press the back button, the scroll position I had in the original page is not restored, thus scrolls to the top.
Possible to disable HTMX’s swapping and just load the page as usual?
I only want to use HTMX to trigger a POST to a different endpoint inside a form (since nested forms aren’t allowed). I’ve got it working, but I don’t seem to be able to disable it, and have it just do a dumb full-page reload. It’s interfering with my other JS and I don’t want to get into fixing it.
How do you toggle query params with checkbox in HTMX?
I want to make a checkbox that toggles the query parameter.