Closed vldmr-k closed 11 months ago
The problem here is that JS can't catch redirects (see who asked that question 🤣).
So while I'm thinking what would be the best way to improve TwinSpark to handle cases like that, you can return a validated form + a <script>
to redirect the user inside that form. Feels a bit ugly, but I have no better ideas right now. :\
HTMx has HX-Location, so maybe that's what I need to add..
Wow. I had no idea that W3C doesn't allow this. Thank you for your anser.
PS: You encountered this problem when I was still going to school :)
Hi!
I want to use
ts-swap="morph"
and redirect after submit form, but it doesn't work well.attribute
ts-req-after
don't triggired, bcs status 3xx is not trueI found solution, response
<script>window.location.href = '...';</script>
, but this method remove form, and customer see white block while page reloading.How it doing better?