# How do I change site?

**URL:** https://forums.fusetools.com/t/how-do-i-change-site/6809
**Category:** How-to Discussions
**Created:** [October 19, 2017, 5:17pm UTC](https://forums.fusetools.com/t/how-do-i-change-site/6809 "2017-10-19T17:17:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Furkan](https://avatars.discourse-cdn.com/v4/letter/f/278dde/32.png) [@Furkan](https://forums.fusetools.com/u/Furkan)
#### Post date: [October 19, 2017, 5:17pm UTC](https://forums.fusetools.com/t/how-do-i-change-site/6809/1 "2017-10-19T17:17:30Z")

</div>

When I want to click a button to change page it wont work. It worked before 😕

Code; [http://prntscr.com/gzgkmf](http://prntscr.com/gzgkmf)

How can I change pages now? ☹

---

<div class="post-metadata">

### Author: ![petterroea](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/petterroea/32/438_2.png) [@petterroea](https://forums.fusetools.com/u/petterroea)
#### Post date: [October 19, 2017, 5:35pm UTC](https://forums.fusetools.com/t/how-do-i-change-site/6809/2 "2017-10-19T17:35:23Z")

</div>

Hello

You really need to post the full code in order for us to have a look at it. Additionally, as the error message hinted, adding the logs here would be an excellent addition.

---

<div class="post-metadata">

### Author: ![Furkan](https://avatars.discourse-cdn.com/v4/letter/f/278dde/32.png) [@Furkan](https://forums.fusetools.com/u/Furkan)
#### Post date: [October 19, 2017, 6:49pm UTC](https://forums.fusetools.com/t/how-do-i-change-site/6809/3 "2017-10-19T18:49:26Z")

</div>

- [Attached UX file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/hZisqnfnIAIu-image-1508438959270.ux)

This is the whole code, there are no errors just node already have parent.

---

<div class="post-metadata">

### Author: ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)
#### Post date: [October 20, 2017, 8:22am UTC](https://forums.fusetools.com/t/how-do-i-change-site/6809/4 "2017-10-20T08:22:15Z")

</div>

I don’t know the exact reason or how that is related to the error you’re getting, but removing `Layer="Background"` from the pages fixes the issue.

If you think about it, that kind of makes sense though. A `Page` shouldn’t really have a `Layer="Background"`, since that takes a node out of the parent visual tree.

Updated your code:

```auto
<App>
    <Router ux:Name="router" />
    <JavaScript>
    var Observable = require("FuseJS/Observable");
    module.exports = {
        gotoFirst: function() {router.goto("firstPage");},
        gotoSecond: function() {router.goto("secondPage");}
    };
    </JavaScript>
    <PageControl ux:Name="pageControl" Active="firstPage">

        <Page Name="firstPage" Color="#64B5F6">
            <Rectangle Name="opacity" Width="70%" Height="50px" Color="#f00" Opacity="0"> 
                <Clicked>
                    <Set pageControl.Active="secondPage" />
                </Clicked>
                <WhileHovering>
                    <Change opacity.Opacity="0.1" Duration="0.2" />
                </WhileHovering>
            </Rectangle>
            <StackPanel Name="clicklist" Width="70%" Height="50px" Color="#0277BD" Opacity="1">
                <DropShadow/>
                <Text FontSize="30" Alignment="Center" Margin="0,10,0,0" TextColor="White">Your Tasks</Text>
            </StackPanel>
        </Page>

        <Page Name="secondPage" Color="#64B5F6">
            <StackPanel Width="100%" Height="100px" Color="#EEEEEE" Alignment="TopCenter"> 
                <DropShadow/>
            </StackPanel>
        </Page>

    </PageControl>
</App>

```

---

<div class="post-metadata">

### Author: ![Furkan](https://avatars.discourse-cdn.com/v4/letter/f/278dde/32.png) [@Furkan](https://forums.fusetools.com/u/Furkan)
#### Post date: [October 29, 2017, 11:45pm UTC](https://forums.fusetools.com/t/how-do-i-change-site/6809/5 "2017-10-29T23:45:30Z")

</div>

thanks
