jolly-kite-167
05/01/2022, 4:08 PMmysterious-toddler-20573
05/01/2022, 5:15 PMjolly-kite-167
05/01/2022, 6:31 PMmysterious-toddler-20573
05/01/2022, 6:34 PMmysterious-toddler-20573
05/01/2022, 6:34 PMbland-coat-6833
05/01/2022, 6:39 PMbland-coat-6833
05/01/2022, 6:39 PMtall-dinner-62086
05/01/2022, 8:12 PMbland-coat-6833
05/02/2022, 6:03 AMrefined-waiter-90422
05/02/2022, 6:11 AMrefined-waiter-90422
05/02/2022, 6:14 AMfew-vegetable-15970
05/02/2022, 7:23 AMsome-hairdresser-28401
05/02/2022, 12:16 PMhx-post fails, the server returns some HTML and it is displayed using hx-target on the client. However, if the request succeeds, I want to send a 303 response from the server and redirect to completely different server side generated page. What's the best way to solve this?some-hairdresser-28401
05/02/2022, 12:18 PM303 currently just renders the HTML of the page to be redirected to where hx-target points to.some-hairdresser-28401
05/02/2022, 12:34 PMHX-Redirect header did the trick but I had to use a 200 response. Is there a specific reason not follow the 303 directly instead of having a new header?few-vegetable-15970
05/02/2022, 1:27 PMsome-hairdresser-28401
05/02/2022, 1:29 PMwitty-garage-37227
05/02/2022, 1:45 PMtall-dinner-62086
05/02/2022, 2:26 PMtall-dinner-62086
05/02/2022, 2:27 PMmysterious-toddler-20573
05/02/2022, 2:29 PMmysterious-toddler-20573
05/02/2022, 2:29 PMfew-vegetable-15970
05/02/2022, 2:59 PMfew-vegetable-15970
05/02/2022, 3:04 PMhx-foo
- try the hx-bar option /modifier
- you can do it with the HX-Baz header
- just rethink the workflow of your client/server interactions...few-vegetable-15970
05/02/2022, 3:04 PMadamant-state-54102
05/02/2022, 3:07 PMhx-include. My checkboxes look like:
<input type="checkbox" name="expire" value="<%= deal.id %>">
and I submit them with this button:
<button id="bulk-expire-btn"
hx-post="/expireDeals"
hx-include="[name='expire']"
>
and I am testing on the backend (express) like this:
app.post('/expireDeals', function(req, res) {
console.log(req.params, req.query)
res.send('a test')
})
But the only output I see in my express server log is: {} {}. I am expecting to see a list of ids because I have checked a handful of the checkboxes before submitting.tall-dinner-62086
05/02/2022, 4:19 PMexpire?adamant-state-54102
05/02/2022, 4:19 PMtall-dinner-62086
05/02/2022, 4:19 PMexpire[]gorgeous-airport-54386
05/02/2022, 4:19 PMreq.body log?