# Tutorial JavaScript does not work

**URL:** <https://forums.fusetools.com/t/tutorial-javascript-does-not-work/1397>\
**Category:** General\
**Created:** [January 7, 2016, 7:15pm UTC](https://forums.fusetools.com/t/tutorial-javascript-does-not-work/1397 "2016-01-07T19:15:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpedrinha](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/dpedrinha/32/487_2.png) [@dpedrinha](https://forums.fusetools.com/u/dpedrinha)\
**Post date:** [January 7, 2016, 7:15pm UTC](https://forums.fusetools.com/t/tutorial-javascript-does-not-work/1397/1 "2016-01-07T19:15:04Z")

</div>

It just won’t update the Button text. Neither on emulator or Android phone.

Here’s the code:

```auto
<App Theme="Basic" Background="#eeeeeeff">
    <DockPanel>
        <JavaScript>
            var Observable = require('FuseJS/Observable');
            var buttontext = Observable('Button');
            var clickcount = 0;

            function click() {
                buttontext.value = 'Clicks: ' + ++clickcount;
            }

           module.exports = {
                    buttontext : buttontext,
                    click : click
                }
        </JavaScript>
        <StatusBarBackground Dock="Top" />
        <ScrollView ClipToBounds="true">
            <StackPanel>
                <Slider />
                <Button Text="Button"/>
                <Switch Alignment="Left" />
            </StackPanel>
        </ScrollView>
    </DockPanel>
</App>

```

What am I doing wrong? I copied it from the tutorial page…

Thanks

---

<div class="post-metadata">

**Author:** ![Kristian\_Hasselknipp](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/kristian_hasselknipp/32/549_2.png) [@Kristian\_Hasselknipp](https://forums.fusetools.com/u/Kristian_Hasselknipp)\
**Post date:** [January 8, 2016, 9:36am UTC](https://forums.fusetools.com/t/tutorial-javascript-does-not-work/1397/2 "2016-01-08T09:36:37Z")

</div>

Hi!

You are not actually data-binding to your buttontext variable. try `<Button Text="{buttontext}" Clicked="{click}"/>`

---

<div class="post-metadata">

**Author:** ![dpedrinha](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/dpedrinha/32/487_2.png) [@dpedrinha](https://forums.fusetools.com/u/dpedrinha)\
**Post date:** [January 8, 2016, 4:15pm UTC](https://forums.fusetools.com/t/tutorial-javascript-does-not-work/1397/3 "2016-01-08T16:15:35Z")

</div>

Thank you for the reply.

The Clicked="{click}" part although not here, was on my code.

But I missed the {buttontext} part.

Cheers!
