You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider we are use so many input element together with hx-include when use htmx, there is no a example for this is strange.
I spend some times to figure this out, following is a example: (use
<inputtype="hidden" name="value1" value=""><span></span><tc-range-slidermin="0"
max="100"
value1="10"
value2="90"
round="0"
script="on change put my.value1 into the previous <span/>then put my.value2 into the next <span/>then set (previous <input/>).value to my.value1then set (next <input/>).value to my.value2
"
<inputtype="hidden" name="value2" value=""><span></span>>
The usage of set (previus <input/>).value is missing in the document.
Do you consider add a example like that?
One more question here, can we simplify above script a bit?
because we set same my.value1 to both input tag and span tag, so i am wonder if we can use like this:
on change set (previous <input/>).value and (previous <span/>).innerHTML to my.value1
But it not work, because and keyword used in the if expression, it not work here, any alternative?
Thanks
The text was updated successfully, but these errors were encountered:
Consider we are use so many input element together with
hx-include
when use htmx, there is no a example for this is strange.I spend some times to figure this out, following is a example: (use
The usage of
set (previus <input/>).value
is missing in the document.Do you consider add a example like that?
One more question here, can we simplify above script a bit?
because we set same
my.value1
to both input tag and span tag, so i am wonder if we can use like this:But it not work, because
and
keyword used in theif
expression, it not work here, any alternative?Thanks
The text was updated successfully, but these errors were encountered: