brief-sugar-79424
03/30/2023, 8:21 AMmysterious-toddler-20573
03/30/2023, 12:39 PMhtml
<form hx-post="/example"
hx-target="next output"
hx-trigger="input[!target.classList.contains('ignoreMe')]">
mysterious-toddler-20573
03/30/2023, 12:39 PMinput
events from targets that have the ignoreMe
class on themwhite-motorcycle-95262
03/30/2023, 2:54 PMhx-swap-oob
set in order to work with hx-select-oob="#my_id"
?mysterious-toddler-20573
03/30/2023, 3:20 PMmysterious-toddler-20573
03/30/2023, 3:20 PMmysterious-toddler-20573
03/30/2023, 3:20 PMwhite-motorcycle-95262
03/30/2023, 3:36 PMhx-swap-oob
but the requesting element had hx-select-oob="#my_id1, #my_id2, #my_id3"
. I got it to work by ditching hx-select-oob
and just specifying hx-swap-oob
in the three divs in the response (e.g., specifying it on #my_id1
, 2, and 3)careful-room-54859
03/30/2023, 5:04 PMchange
to fire only when the current select and another select have values. Not sure how to create the syntax. Also, if it is easier to achieve on the Hypersciript side, I would still like to simulate an HTMX swap event so but not sure which way is easier?eager-plumber-49649
03/30/2023, 5:38 PMeager-plumber-49649
03/30/2023, 5:46 PMeager-plumber-49649
03/30/2023, 5:47 PMmysterious-toddler-20573
03/30/2023, 5:52 PMensureMyConditionIsMet()
(and rename it to whatever is sensible)mysterious-toddler-20573
03/30/2023, 6:08 PMhtml
<div hx-get="/whatever"
_="on change
if #select-1's value is not '' and
#select-2's value is not '' then
trigger submitRequest"
hx-trigger="submitRequest" ...>
mysterious-toddler-20573
03/30/2023, 6:08 PMmysterious-toddler-20573
03/30/2023, 6:08 PMmysterious-toddler-20573
03/30/2023, 6:09 PMcareful-room-54859
03/30/2023, 6:11 PMhx-get
includes the query parameter as well as the current url?mysterious-toddler-20573
03/30/2023, 6:23 PMmysterious-toddler-20573
03/30/2023, 6:24 PMproud-librarian-99598
03/30/2023, 6:27 PMcareful-room-54859
03/30/2023, 6:29 PMfragment_id
provided in the query parameters, then I know that I am not returning the full template but just a portion of the HTML generated on the server. This allow my users to create a single template but then reference different parts of it that they want to be refreshed when an event happens. So I am trying to update the current URL with a customer query parameter, fragment_id
. The form data can also be passed in as well but that is not the issue I am trying to solve right now. I am just trying to define a user friendly way to generically achieve this when they are creating their screens.mysterious-toddler-20573
03/30/2023, 6:54 PMhtmx:configRequest
event and update the detail.url
property: https://htmx.org/events/#htmx:configRequestcareful-room-54859
03/30/2023, 6:54 PMsome-airline-73512
03/30/2023, 11:06 PMsome-airline-73512
03/30/2023, 11:07 PMhttps://cdn.discordapp.com/attachments/725789747212976259/1091136531852435507/image.pngâ–¾
agreeable-midnight-69265
03/31/2023, 9:55 AMechoing-lion-55988
03/31/2023, 11:21 AMrefined-waiter-90422
03/31/2023, 12:38 PMmysterious-toddler-20573
03/31/2023, 12:39 PM