---
title: "htmx trigger request via JS event"
url: https://daily.dev/posts/htmx-trigger-request-via-js-event-gxqh5sv7l
source_url: https://flaviocopes.com/htmx-trigger-request-via-js-event
type: article
source: "Flavio Copes"
published: 2023-12-28T18:55:34.410Z
updated: 2024-01-19T02:12:21.750Z
tags: ["alpinejs", "htmx", "javascript", "webdev"]
reading_time: 2
upvotes: 1
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# htmx trigger request via JS event

**[Flavio Copes](https://daily.dev/sources/flaviocopes)** · 2 min read · 1 upvotes · 0 comments

## Summary

Learn how to trigger a network request via a JS event in htmx by listening to the change event on a select HTML element and dispatching a create-new-team event on the body.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://flaviocopes.com/htmx-trigger-request-via-js-event>

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#alpinejs](https://daily.dev/tags/alpinejs), [#htmx](https://daily.dev/tags/htmx), [#javascript](https://daily.dev/tags/javascript), [#webdev](https://daily.dev/tags/webdev)

[View this post on daily.dev](https://daily.dev/posts/htmx-trigger-request-via-js-event-gxqh5sv7l)
