Relative Content

Tag Archive for javascripthtmlhtmx

How can I trigger hx-post with dynamic url

I’m making a website with HTMX. I usually manage to do what I want with HTMX but I have a problem activating an hx-post with a dynamic URL. I have a list of items that the user must be able to rename and for that I open a modal. When I press the save button of my modal it must activate an hx-post that will send the new name to my API. I need a dynamic URL to have only once the HTML code of my modal without having to hardcode it for each item in the list