hundreds-camera-24900
03/02/2022, 2:35 PMhundreds-camera-24900
03/02/2022, 2:36 PMmysterious-toddler-20573
03/04/2022, 3:04 PMswift-belgium-99945
03/07/2022, 10:02 AMblue-gold-89534
03/07/2022, 11:22 AMwhite-motorcycle-95262
03/09/2022, 2:20 AMhx-disinherit
has been implemented, or are you doing something different these days? I'm thinking of implementing this now, but also adding hx-history-elt
to #main-body-wrapper
so that I can still load JS libs right before </body>
(I recently discovered that putting scripts down there causes them to execute multiple times when using browser back, unless you change the hx-history-elt
).ancient-angle-7831
03/10/2022, 7:09 AMafterSwap
?user
03/14/2022, 7:34 AMblue-gold-89534
03/14/2022, 7:35 AMuser
03/14/2022, 7:36 AMblue-gold-89534
03/14/2022, 7:36 AMblue-gold-89534
03/14/2022, 7:37 AMuser
03/14/2022, 7:37 AMblue-gold-89534
03/14/2022, 7:37 AMblue-gold-89534
03/14/2022, 7:38 AMblue-gold-89534
03/14/2022, 7:38 AMuser
03/16/2022, 1:59 PMsendcommand
url sends and executes the command in a terminal and returns the output of that command and displays it in "log" which is just a div . What I want to do is reset the input field on submit.
html
<div id="log"></div>
<form hx-post="{% url 'sendcommand' %}" hx-swap="innerHTML" hx-target="#log">
<input type="text" id="commandinput" name="command"/>
</form>
Sorry if this it not the right place to ask, but this seems like something that should be pretty easy. Feel free to send me a PMhundreds-camera-24900
03/16/2022, 2:32 PMhundreds-camera-24900
03/16/2022, 2:32 PMhundreds-camera-24900
03/16/2022, 2:33 PM<input type="text" name="command" id="commandinput" hx-swap-oob="true" />
as a top level element in the responsehundreds-camera-24900
03/16/2022, 2:34 PMhundreds-camera-24900
03/16/2022, 2:35 PM<div id="log"></div>
<form hx-post="{% url 'sendcommand' %}" hx-swap="innerHTML">
<input type="text" id="commandinput" name="command"/>
</form>
response ------
<div id="log" hw-swap-oob="true> ....</div>
<input type="text" id="commandinput" name="command"/>
hundreds-camera-24900
03/16/2022, 2:35 PMgorgeous-airport-54386
03/16/2022, 2:36 PMgorgeous-airport-54386
03/16/2022, 2:36 PMhundreds-camera-24900
03/16/2022, 2:36 PMhundreds-camera-24900
03/16/2022, 2:37 PMhundreds-camera-24900
03/16/2022, 2:37 PMgorgeous-airport-54386
03/16/2022, 3:11 PMbrave-magazine-28098
03/16/2022, 10:19 PM