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

    freezing-waitress-26396

    11/25/2022, 6:53 AM
    Hello formatting on discord mobile???
  • f

    fresh-lighter-53021

    11/25/2022, 6:55 AM
    Got it! Will try and revert back
  • f

    fresh-lighter-53021

    11/25/2022, 6:56 AM
    > Hello formatting on discord mobile??? Yess...
  • f

    freezing-waitress-26396

    11/25/2022, 7:04 AM
    Oh nvm slick has a
    slickAdd
    for this. Apparently you pass the stringified html or DOM element of the swapped in element this way https://github.com/kenwheeler/slick#:~:text=current%20slide%20index-,slickAdd,-element%20%3A%20html%20or
  • b

    boundless-leather-51644

    11/25/2022, 7:52 AM
    java backend developed using quarkus framework
  • f

    fresh-van-39038

    11/25/2022, 8:51 AM
    I've tried to have and directly in the hx loaded content, and it works very well! Still, I am not sure how well: - does it scales if the app gets larger perf wise (the scripts & styles are dispached in different server-side components) - is it a good practice? - is it well supported across different browsers?
  • f

    fresh-van-39038

    11/25/2022, 8:53 AM
    - would it make it better if the script/styles are all in one
    <script>
    <style>
    instead of many?
  • f

    fresh-van-39038

    11/25/2022, 9:03 AM
    Those are not really htmx questions but more related to html and javascript, but I guess you must already have considered those
  • b

    boundless-leather-51644

    11/25/2022, 9:03 AM
    The issue was related to a bad value passed to the backend and REST endpoint which was not able to process it
  • t

    thankful-cat-54263

    11/25/2022, 2:41 PM
    say I have a textarea in a form, and I'd like the form to submit when the textarea has triggered... how would I do that? I'm starting with
    hx-trigger = "keyup changed delay:500"
    on the
    textarea
    , but I don' t know to to bridge that to the form if I move the
    hx-get
    from the
    textarea
    to the
    form
  • t

    thankful-cat-54263

    11/25/2022, 3:11 PM
    The reason for this is that I'd like to include a checkbox value in the payload. Maybe there's another way...
  • m

    mysterious-toddler-20573

    11/25/2022, 3:20 PM
    If the text area is within a form it should include all other inputs in its request, but only for a non-GET. GET's are special because you don't want "link-like" elements within a form (e.g. a cancel button/link) submitting the form values in a query string. Since you are using an hx-get, you'll want to
    hx-include='closest form'
    to get that behavior.
  • t

    thankful-cat-54263

    11/25/2022, 3:34 PM
    Ah cool. So I'll just switch to post. Doesn't matter to me right now. Thanks!
  • f

    fresh-van-39038

    11/25/2022, 3:36 PM
    @mysterious-toddler-20573 could you have a look at my question, it might be caught in the middle of others 🙂
  • m

    mysterious-toddler-20573

    11/25/2022, 3:49 PM
    It Depends ™️
  • m

    mysterious-toddler-20573

    11/25/2022, 3:49 PM
    I generally like to load all my scripts and styles up front
  • m

    mysterious-toddler-20573

    11/25/2022, 3:49 PM
    and then react to events for specific pages
  • m

    mysterious-toddler-20573

    11/25/2022, 3:50 PM
    but some people don't like the performance characteristic of a big initial load of resources and so they prefer to defer it. I would probably go w/ things up front to start and then if there are perf issues incrementalize it. But if you already have an approach that is working, that's fine. Also note that we are working on a plugin for head tag merging: https://htmx.org/extensions/head-support/
  • f

    fresh-van-39038

    11/25/2022, 3:56 PM
    cool!
  • t

    thankful-cat-54263

    11/25/2022, 4:17 PM
    I've found that it works after switching to hx-post; but it seems I need to repeat the hx-output and hx-post and hx-target on the textarea -- does that sound right?
  • t

    thankful-cat-54263

    11/25/2022, 4:19 PM
    💡 I don't need to put them on the form if I only use the textarea for triggering
  • d

    dazzling-dusk-82436

    11/25/2022, 10:03 PM
    Slightly Off topic to HTMX
  • d

    dazzling-dusk-82436

    11/25/2022, 10:03 PM
    I spent the last 2 days doing server-side rendered charts
  • d

    dazzling-dusk-82436

    11/25/2022, 10:03 PM
    and it knocked down the render time of charts from 6-15 seconds on the FE to 3 seconds
  • d

    dazzling-dusk-82436

    11/25/2022, 10:03 PM
    didnt do it because of speed, but just a nice side-note
  • m

    mysterious-toddler-20573

    11/25/2022, 10:09 PM
    the server side: is there anything it can't do?
  • d

    dazzling-dusk-82436

    11/25/2022, 10:14 PM
    Might knock it down more if I used a proper time series DB instead of streaming entries in the backend
  • d

    dazzling-dusk-82436

    11/25/2022, 10:14 PM
    I've written some very cursed 10 line streams today
  • m

    mysterious-doctor-98164

    11/26/2022, 4:05 AM
    I'm sure I'm being a complete noob, but I wasn't able to find where it's documented that
    event
    is available in that scope. Can anyone point me to it?
  • r

    ripe-action-67367

    11/26/2022, 8:23 AM
    https://htmx.org/attributes/hx-vals/ > When using evaluated code you can access the event object.
1...922923924...1146Latest