Skip to content

hx-include and <tbody><tr><td> #2059

Answered by Telroshan
PorcoRosso85 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, what do you mean by "not working" exactly?
I set up a JSFiddle with the code you provided above, and this one with the second hx-include syntax you mentioned (i.e. closest tr).

  • Please note that since you had forgotten to define a hx-post on your button like in the first code sample, the button wasn't doing anything on click (which is perfectly normal as it isn't told what request to do at all)
  • I added the same hx-post than your first code sample's button, you can see how the request is correctly made and properly includes the values of the other inputs in your browser's network tab

Hope this helps!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PorcoRosso85
Comment options

Answer selected by PorcoRosso85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants