https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • l

    late-king-98305

    08/15/2022, 1:36 PM
    htmx should send everything in the enclosing
    form
    on a `POST`; would it be possible to have these actions wrapped in an enclosing form? I've done that on my "item maintenance" page; I start with a form (with the CSRF tokens), then render each item with its requisite actions within that form, using
    hx-post
    with the ID for that particular one.
  • l

    late-king-98305

    08/15/2022, 1:43 PM
    Here's an example of what I'm talking about; it uses Liquid, but the concept works however you're generating it. https://github.com/bit-badger/myWebLog/blob/6b49793fbb71731ea27404d4e7f4963d2eff0995/src/admin-theme/tag-mapping-list-body.liquid#L12
  • h

    hundreds-camera-24900

    08/15/2022, 4:17 PM
    Are you pushing the url? I see that often when replacing the url with one that only works in partial format
  • d

    delightful-student-39557

    08/15/2022, 5:21 PM
    I have some paths of my app as normal request. I notice this happening when I go from a normal view back to a htmx view. Also this was only noticed in chromium based browsers. Other browsers it was normal and no naked partial rendering was noticed. And yes I am pushing url.
  • b

    brave-dog-98297

    08/15/2022, 9:52 PM
    Thanks for that suggestion. I don't think it would work as you have it, as my page is initially rendered with normal data and a button swaps in the edit form for that section. It's in the edit form I am unable to target the original div for the post response. But you have given me an idea that I can try...
  • o

    orange-umbrella-24375

    08/16/2022, 5:07 AM
    Hi all! Is the
    htmx:load
    event expected to only be triggered once in a normal request? Because I was logging to console and saw that it was triggered multiple times for a single click event, specifically for a link that had
    hx-boost=true
    on it.
  • o

    orange-umbrella-24375

    08/16/2022, 11:27 AM
    To answer my own question, I found this [answer](https://github.com/bigskysoftware/htmx/issues/557), so I guess
    htmx:load
    is not exactly similar to an
    onLoad
    event since it can be triggered multiple times for a single htmx-powered ajax request.
  • p

    prehistoric-energy-54888

    08/16/2022, 6:06 PM
    is it possible to send a webdav LOCK request with htmx?
  • m

    mysterious-toddler-20573

    08/16/2022, 6:49 PM
    what does that look like?
  • m

    mysterious-toddler-20573

    08/16/2022, 6:50 PM
    going by this: https://docs.microsoft.com/en-us/previous-versions/office/developer/exchange-server-2003/aa142897(v=exchg.65)
  • m

    mysterious-toddler-20573

    08/16/2022, 6:50 PM
    I don't think so
  • m

    mysterious-toddler-20573

    08/16/2022, 6:50 PM
    if there is a way to make the xhr object issue one, it wouldn't be hard to hack in support though
  • p

    prehistoric-energy-54888

    08/16/2022, 6:51 PM
    https://datatracker.ietf.org/doc/html/rfc4918#section-9.10.7
  • p

    prehistoric-energy-54888

    08/16/2022, 6:54 PM
    i guess i would do something like
    req.open("LOCK", "http://www.example.org/");
    on an XMLHttpRequest object
  • a

    ancient-shoe-86801

    08/16/2022, 11:40 PM
    be me show htmx app to boss boss very happy with the behavior and style of the app boss asks: is this all with htmx? me: yes, interactivity driven by htmx and basic html elements with styling. For example, this thing in here is just a plain html table with input elements in it expanding to the entire cell. big smile
  • a

    ancient-shoe-86801

    08/16/2022, 11:41 PM
    I forgot to mention to him that I used hyperscript for extra awesomeness
  • r

    refined-waiter-90422

    08/17/2022, 3:15 AM
    Nice one
  • r

    rough-battery-73940

    08/17/2022, 3:30 AM
    Hey all, what do ya'll think of Rich Harris's criticisms of using HTML responses instead of client-side JS frameworks? He's talking about Hotwire, but I think it also applies to HTMX.

    https://www.youtube.com/watch?v=860d8usGC0o&t=621s▾

    I promise I'm not trying to start a flame war, but I am trying to decide what direction to go with my new project and I'm hearing really good arguments on both sides
  • m

    mysterious-toddler-20573

    08/17/2022, 3:40 AM
    https://htmx.org/essays/a-response-to-rich-harris/
  • m

    mysterious-toddler-20573

    08/17/2022, 3:41 AM
    TLDR: it's a good talk, but htmx and other advanced hypermedia-based libraries can often achieve the interactivity necessary for an application at much lower complexity
  • m

    mysterious-toddler-20573

    08/17/2022, 3:41 AM
    as always, It Depends (tm)
  • i

    important-cricket-63511

    08/17/2022, 3:46 AM
    Is there a way to initialize HTMX manually? Something like an
    htmx.init()
    JS call?
  • m

    mysterious-toddler-20573

    08/17/2022, 3:49 AM
    never forget: https://twitter.com/Rich_Harris/status/1475268145858424837
  • m

    mysterious-toddler-20573

    08/17/2022, 3:49 AM
    😑
  • m

    mysterious-toddler-20573

    08/17/2022, 3:49 AM
    You have content that has htmx attributes in it and you want to turn them on?
  • m

    mysterious-toddler-20573

    08/17/2022, 3:49 AM
    https://htmx.org/api/#process
  • r

    rough-battery-73940

    08/17/2022, 3:58 AM
    I liked the response, but the one thing that keeps bothering me is the fact that I'll be fine using HTMX 90% of the time, but if/when I need more sophisticated JS, I'll have to reach for and learn a new library
  • m

    mysterious-toddler-20573

    08/17/2022, 3:58 AM
    yep
  • r

    rough-battery-73940

    08/17/2022, 3:58 AM
    I do like not having to mess with any build tools. I think that's a killer feature
  • m

    mysterious-toddler-20573

    08/17/2022, 3:58 AM
    yep
1...779780781...1146Latest