How do I change an element valut at runtime? I know changeName.text = n.values
is incorrect but what should it be?
include karax / prelude
import karax / [vstyles]
proc onNameEnter(ev: Event; n: VNode) =
if n.value.strip() != "":
changeName.text
Thank you kidandcat. But I still did not get it to work.
I changed
myText = "Name will appear here"
to
myText: kstring = "Name will appear here"
as it said that it was expecting a string but was getting a kstring.
Also found a typo I made
myText = n.values
to
myText = n.value
Th
Perfect. Thank you @kidandcat, @hiteshjasani and @jyapayne.
How do I add HTML elements at runtime? I am aware of the following example
[https://github.com/pragmagic/karax#event-model
](https://github.com/pragmagic/karax#event-model) but I can not convert the
example to anything else but a kstring. Manipulating the code ends in failure.
What if I wanted
Thank you @jyapayne. It seems very simple now that I see code that works.