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

    powerful-helmet-42757

    03/02/2023, 7:32 PM
    Adding
    hx-disable
    (after the DOM has loaded) has no effect as well.
  • p

    powerful-helmet-42757

    03/02/2023, 7:32 PM
    Any way I can tell HTMX to forget about a link after it's been initialized ?
  • m

    mysterious-toddler-20573

    03/02/2023, 7:47 PM
    htmx.process()
    on the node should re-init it
  • p

    powerful-helmet-42757

    03/02/2023, 7:50 PM
    I'll try it right now - thanks
  • p

    powerful-helmet-42757

    03/02/2023, 9:05 PM
    Solved! - Thank you.
  • m

    mysterious-toddler-20573

    03/02/2023, 9:47 PM
    prepping for a small htmx release tomorrow: https://dev.htmx.org/test/1.8.6/test/
  • l

    late-king-98305

    03/02/2023, 10:31 PM
    works on my machine
  • n

    narrow-shoe-86904

    03/02/2023, 11:13 PM
    How can I post all the input elements in a DIV not in a FORM. Currently I do this and it works, but is too much writing > "hx-include": "#CardSettings [name='name'], #CardSettings [name='status'], #CardSettings [name='downloads_enabled'], #CardSettings [name='leads_enabled'], #CardSettings [name='marketplace_enabled'], #CardSettings [name='sales_enabled'], #CardSettings [name='social_widget_enabled']",
  • a

    adventurous-ocean-93733

    03/02/2023, 11:16 PM
    Something like:
    Copy code
    hx-include= "#CardSettings [type='input']"
    Or give all your inputs a class of e.g.
    .includeinput
    and then use that css selector
  • b

    big-airline-13935

    03/02/2023, 11:16 PM
    All tests passing.
  • a

    adventurous-ocean-93733

    03/02/2023, 11:18 PM
    Or, you might just be able to do this to get all inputs:
    Copy code
    hx-include="#CardSettings"
    Since this page: https://htmx.org/attributes/hx-include/ Says: > Note that if you include a non-input element, all input elements enclosed in that element will be included.
  • n

    narrow-shoe-86904

    03/02/2023, 11:25 PM
    This one indeed worked. Thanks > hx-include="#CardSettings"
  • m

    mysterious-toddler-20573

    03/02/2023, 11:59 PM
    https://twitter.com/htmx_org/status/1631443922399666177
  • m

    mysterious-toddler-20573

    03/02/2023, 11:59 PM
    https://htmx.org/posts/2023-03-02-htmx-1.8.6-is-released/
  • m

    mysterious-toddler-20573

    03/02/2023, 11:59 PM
    https://hyperscript.org/posts/2023-03-02-hyperscript-0.9.8-is-released/
  • r

    refined-waiter-90422

    03/03/2023, 3:40 AM
    omg sass was not doing much, wtf aha. Good to see another dependency gone.
  • r

    refined-waiter-90422

    03/03/2023, 3:41 AM
    Very nice release!
  • c

    cuddly-keyboard-70746

    03/03/2023, 1:25 PM
    htmx releases
  • c

    cuddly-keyboard-70746

    03/03/2023, 1:25 PM
    lol I thought I was binging it
  • f

    flat-vase-53984

    03/03/2023, 2:12 PM
    Hi. Can you help with one question - is there any way to get cookies using htmx? Thanks!
  • l

    limited-teacher-83117

    03/03/2023, 5:28 PM
    Can you be a little more specific about what you're trying to do? Generally speaking, with HTMX you'll be using the browser's rules to set and send cookies i.e. the server returns a header to set cookies, and the browser will attach those cookies to requests (that HTMX makes) based on a variety of rules. There's a bunch of subtopics there but if you give an example I can maybe point you in the right direction
  • i

    incalculable-table-59550

    03/04/2023, 4:23 PM
    hello, how is everyone, is there anyone online?
  • b

    bitter-carpet-58319

    03/04/2023, 4:29 PM
    > Have simple CGI-BIN page for upload image to server script via PUT method. Trying something like this, but have no luck. Could someone kick me to right direction?
    <input id="new_area" type="file" name="mapfile" hx-put="cgi-bin/upload.pl/map.png">
  • b

    bitter-carpet-58319

    03/04/2023, 4:49 PM
    > Server script successfully tested by:
    curl.exe -u "user:passwd" -T "c:\work\map.png" "map.png"
  • l

    late-king-98305

    03/04/2023, 4:58 PM
    I don't think you're going to be able to use htmx to do file upload just with an
    hx-put
    . You can either force a page refresh when it's done (i.e., a non-htmx request), or handle it via your own JavaScript.
  • r

    ripe-action-67367

    03/04/2023, 5:01 PM
    You can, although it will use form-based upload with
    multipart/form-data
  • r

    ripe-action-67367

    03/04/2023, 5:01 PM
    Copy code
    html
    <input id="new_area" type="file" name="mapfile" hx-encoding="multipart/form-data" hx-put="https://httpbin.org/put">
  • r

    ripe-action-67367

    03/04/2023, 5:02 PM
    If you want to do raw file uploads however, this is where things get tricky
  • b

    bitter-carpet-58319

    03/04/2023, 5:07 PM
    > I need perform exact same data transfer as
    curl.exe -T
    doing, do not know if this is called 'raw file'
  • c

    colossal-engine-30767

    03/04/2023, 7:54 PM
    Has anyone go an infinite scroll to work in both directions? Using the docs here: https://htmx.org/examples/infinite-scroll/ I've got this working when scrolling downwards, but when I implement this going upwards it creates an infinite loop and attempts to hit the server again and again. My use case is I have a range of dates from 0 AD (ACE) through to 2023 AD (ACE) that I have datapoints for. The user will see the dates in a nested scroll div with a fixed height containing dates 1890 to 1910, starting at 1900 but if they scroll up or down more dates will load. My code for the above which creates an infinite loop of requests to the server:
1...105510561057...1146Latest