Clear textarea after sending
This commit is contained in:
parent
95a58f0f4b
commit
af287b8f49
8
main.go
8
main.go
@ -58,8 +58,12 @@ func main() {
|
||||
app.Get("/callbackSignup", handleCallbackSignup)
|
||||
|
||||
app.Get("/test", func(c *fiber.Ctx) error {
|
||||
fmt.Println("Current User: ", getCurrentUser(), " - ", checkIfLogin())
|
||||
return c.Render("test", fiber.Map{})
|
||||
fmt.Println("Hello from test")
|
||||
return c.SendString("")
|
||||
})
|
||||
|
||||
app.Get("/empty", func(c *fiber.Ctx) error {
|
||||
return c.SendString("")
|
||||
})
|
||||
|
||||
// Start server
|
||||
|
@ -14,7 +14,7 @@
|
||||
<button {% if not IsLogin or not HaveKey %}disabled{% endif %} type="submit"
|
||||
class="send-button button is-primary is-small" hx-post="/requestMultipleMessages"
|
||||
hx-swap="beforeend settle:200ms" hx-target="#chat-messages" id="chat-input-send-btn"
|
||||
class="chat-input" hx-include="[name='message'], [name^='model-check-']">
|
||||
class="chat-input" hx-include="[name='message'], [name^='model-check-']" onclick="clearTextArea()">
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-chevron-right"></i>
|
||||
</span>
|
||||
@ -22,4 +22,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function clearTextArea() {
|
||||
document.querySelector('.textarea').value = '';
|
||||
}
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user