# (SOLVED) Update Widget Text/Values on Action

**URL:** <https://discourse.julialang.org/t/solved-update-widget-text-values-on-action/24146>\
**Category:** General Usage\
**Created:** [May 12, 2019, 7:08pm UTC](https://discourse.julialang.org/t/solved-update-widget-text-values-on-action/24146 "2019-05-12T19:08:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [May 12, 2019, 7:08pm UTC](https://discourse.julialang.org/t/solved-update-widget-text-values-on-action/24146/1 "2019-05-12T19:08:56Z")

</div>

Hey all I’ve been trying to use Julias on board UI for a few things. I’m having a hard time getting things the way I want them. Totally fine with making buttons, and having them do tasks on observables, everythings good there! Can’t seem to find a simple way, or if it’s even possible, to say press a button and update the text in a textbox.

Something like this,

```nohighlight

using Interact, WebIO, Blink
#Blink.AtomShell.install()

btn = button("Btn Text");
rltxt = Observable{Any}("Default Text");
txt = textbox(rltxt[]);
map!(btn.scope.dom.children.tail[1], rltxt, btn);

#btn.scope.dom.children.tail[1]
w = Window()
body!(w, hbox(btn, txt))

```

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [May 12, 2019, 7:15pm UTC](https://discourse.julialang.org/t/solved-update-widget-text-values-on-action/24146/2 "2019-05-12T19:15:21Z")

</div>

edit I solved that with the following:

```nohighlight
using Interact, WebIO, Blink
#Blink.AtomShell.install()
btn = button("Btn Text");
rltxt = Observable{Any}("Default Text");
txt = textbox(rltxt[]);
map!(t -> btn.scope.dom.children.tail[1], txt, btn);

w = Window()
body!(w, hbox(btn, txt))

```

But how about an autocomplete box?

```nohighlight
btn = button("Btn Text");
rltxt = Observable{Any}(["Default Text1","Default Text2"]);
txt = autocomplete( rltxt[] );
map!(t -> [btn.scope.dom.children.tail[1],"cookies"], txt, btn);

w = Window()
body!(w, hbox(btn, txt))

```

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [May 12, 2019, 7:20pm UTC](https://discourse.julialang.org/t/solved-update-widget-text-values-on-action/24146/3 "2019-05-12T19:20:42Z")

</div>

woop solved that one too,

```nohighlight
btn = button("Btn Text");
rltxt = Observable{Any}(["Default Text1","Default Text2"]);
txt = autocomplete( rltxt );
map!(t -> [btn.scope.dom.children.tail[1],"cookies"], rltxt, btn);

w = Window();
body!(w, hbox(btn, txt))

```

Might be good to add this sort of thing to the docs.
