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

    mysterious-toddler-20573

    10/24/2020, 3:34 PM
    yes
  • t

    thankful-addition-60522

    10/24/2020, 3:35 PM
    Clarify please
  • r

    rich-eve-33269

    10/25/2020, 8:15 AM
    quick question
  • r

    rich-eve-33269

    10/25/2020, 8:15 AM
    is it posibble to do something like this
  • r

    rich-eve-33269

    10/25/2020, 8:16 AM
    I want to push a value from an input type on button click to the url
  • r

    rich-eve-33269

    10/25/2020, 8:16 AM
    say an input type text with a value of "title". When I click a button I want to push that title as a param to the url
  • r

    rich-eve-33269

    10/25/2020, 8:17 AM
    the catch: title value is empty at start, so I only want to push the updated value
  • r

    rich-eve-33269

    10/25/2020, 8:17 AM
    and then use that value as the value from the input again
  • h

    helpful-secretary-3515

    10/25/2020, 2:39 PM
    i love to use HTMX. i have a gallery running, and HTMX helps me to load the items dynamic. but than the new items (added by htmx), are not ordered well, the JS-effects are missing, because the JS-functions has to be started again.
  • h

    helpful-secretary-3515

    10/25/2020, 2:40 PM
    how can i use HTMX, not just to add HTML, but also to call some JS-functions ?!
  • h

    helpful-secretary-3515

    10/25/2020, 2:41 PM
    https://codepen.io/zen8/pen/zYBNbLN
  • h

    helpful-secretary-3515

    10/25/2020, 2:43 PM
    this codepen-file is the main one. and it make a call (htmx) to this file: https://codepen.io/zen8/pen/zYBNRrb
  • h

    helpful-secretary-3515

    10/25/2020, 2:45 PM
    my problem is, that HTMX wors great, to add the items, after i click the button. but the JS function are not working for this new items (added by htmx) , how can i restart the JS-functions to let the HEART and SHOPINGBASKET-Icon Effect work?
  • m

    mysterious-toddler-20573

    10/25/2020, 3:05 PM
    @User you need to initialize the new content with your js library
  • m

    mysterious-toddler-20573

    10/25/2020, 3:06 PM
    https://dev.htmx.org/api/#onLoad
  • m

    mysterious-toddler-20573

    10/25/2020, 3:06 PM
    (sorry, the javascript API documentation is new and hasn't been released, so I have to link to the dev site)
  • m

    mysterious-toddler-20573

    10/25/2020, 3:08 PM
    > quick question @User Yes, I think so. In fact, that would be the default behavior. When you say "I only want to push the updated value and then use that value as the value from the input again" if the button is a
    GET
    and the input is included in the request, and you have
    hx-push
    set to
    true
    it should end up in the URL. Re-using the value in the input is just a matter of rerendering the input with the updated value (assuming you are rerendering the input)
  • r

    rich-eve-33269

    10/25/2020, 3:10 PM
    thanks for the reply
  • r

    rich-eve-33269

    10/25/2020, 3:10 PM
    gonna see if I can get it to work
  • m

    mysterious-toddler-20573

    10/25/2020, 3:10 PM
    yes, I can help, but this sounds like it should work pretty easily and if you have any bumps just let me know
  • r

    rich-eve-33269

    10/25/2020, 3:20 PM
    👍
  • l

    lively-beach-14291

    10/25/2020, 5:02 PM
    The brief chat about how htmx could be used with web components seems interesting, but, is that stuff even alive these days? I'm pretty sure polymer isn't maintained.
  • g

    gorgeous-ghost-95789

    10/25/2020, 5:03 PM
    Not polymer. I think it’s dead.
  • g

    gorgeous-ghost-95789

    10/25/2020, 5:04 PM
    It was a “polyfill” for WebComponents. Once browser support improved, it was left behind in favor of LitElement.
  • g

    gorgeous-ghost-95789

    10/25/2020, 5:05 PM
    They’re not a silver bullet, and don’t replace big tools like React of Angular. But, they seem fast, light, and interoperable.
  • l

    lively-beach-14291

    10/25/2020, 5:05 PM
    @User I think that @mysterious-toddler-20573 has said that he's "glad to see people like @User and @User use htmx for component systems, but it's not his wheelhouse", so I presume he's probably leaning on you to make any components, such as your sortable list, and isn't going to directly engage ... but, @mysterious-toddler-20573 has been great with prompt bug fixes.
  • g

    gorgeous-ghost-95789

    10/25/2020, 5:06 PM
    So, I wouldn’t try to make a whole app using WebComponents, but they (could?) fit into the HTMX ecosystem great.
  • t

    thankful-addition-60522

    10/25/2020, 5:06 PM
    as i said https://discordapp.com/channels/725789699527933952/725789747212976259/769204988005187645
  • l

    lively-beach-14291

    10/25/2020, 5:08 PM
    @User So, in discussion with a colleague, he's politely thinking that I'll lose interest in HTMX and eventually have to use "standard" component framework like React/Vue. Even so, it seems like WebComponents could work really nicely with HTMX, no? The main question was "in an htmx based application, how do you manage application state", the assertion that nested components is essential to this task.
  • m

    mysterious-toddler-20573

    10/25/2020, 5:09 PM
    Hypertext As The Engine of Application State
1...626364...1146Latest