# Link to another tab using dashboard button

**URL:** <https://discourse.nodered.org/t/link-to-another-tab-using-dashboard-button/11211>\
**Category:** Dashboard\
**Created:** [16 May 2019 14:02 UTC](https://discourse.nodered.org/t/link-to-another-tab-using-dashboard-button/11211 "2019-05-16T14:02:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nassima100](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@nassima100](https://discourse.nodered.org/u/nassima100)\
**Post date:** [16 May 2019 14:02 UTC](https://discourse.nodered.org/t/link-to-another-tab-using-dashboard-button/11211/1 "2019-05-16T14:02:27Z")

</div>

Hello I'm trying to have a link that redirect me to another tab using a dashboard button, the thing is when I'm on [http://127.0.0.1:1880/ui/#!/0](http://127.0.0.1:1880/ui/#!/0) and I want the button to redirect me for example to [http://127.0.0.1:1880/ui/#!/4](http://127.0.0.1:1880/ui/#!/4) the URL shows in the URL bar but it doesn't redirect me to the page I unless I refresh it , and if I try other links it works perfectly. What am I doing wrong ?  
here is my button

```auto
[{"id":"1e2003fa.fc243c","type":"ui_button","z":"31bffd1c.2e1ff2","name":"","group":"74304850.5a39a8","order":20,"width":"6","height":"1","passthru":false,"label":" <a href=\"http://127.0.0.1:1880/ui/#!/4\" >Consulter</a>","tooltip":"","color":"","bgcolor":"#a1c45a","icon":"<img src=\"/bdd.png\" />","payload":"","payloadType":"str","topic":"","x":345.5078125,"y":1416.3752307891846,"wires":[[]]},{"id":"74304850.5a39a8","type":"ui_group","z":"","name":"Météo","tab":"16b00ee3.e42d71","order":1,"disp":false,"width":"6","collapse":false},{"id":"16b00ee3.e42d71","type":"ui_tab","z":"","name":"Tableau de bord","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [16 May 2019 14:56 UTC](https://discourse.nodered.org/t/link-to-another-tab-using-dashboard-button/11211/2 "2019-05-16T14:56:46Z")

</div>

Why not use the ui\_control node that is designed to do this for you ? just send the number 4 into it.

---

<div class="post-metadata">

**Author:** ![nassima100](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@nassima100](https://discourse.nodered.org/u/nassima100)\
**Post date:** [16 May 2019 14:59 UTC](https://discourse.nodered.org/t/link-to-another-tab-using-dashboard-button/11211/3 "2019-05-16T14:59:02Z")

</div>

I wasn't aware of that, it worked thanks!

---

<div class="post-metadata">

**Author:** ![carrero](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@carrero](https://discourse.nodered.org/u/carrero)\
**Post date:** [21 May 2020 10:22 UTC](https://discourse.nodered.org/t/link-to-another-tab-using-dashboard-button/11211/4 "2020-05-21T10:22:53Z")

</div>

How?. Im sending with a button the number 1 which is the second tab into an ui control and it doesnt work!

---

<div class="post-metadata">

**Author:** ![LilGrundy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lilgrundy/32/87875_2.png) [@LilGrundy](https://discourse.nodered.org/u/LilGrundy)\
**Post date:** [4 March 2024 19:33 UTC](https://discourse.nodered.org/t/link-to-another-tab-using-dashboard-button/11211/5 "2024-03-04T19:33:10Z")

</div>

Good morning, how do you implement it? Since I tried it like this but it doesn't redirect me, do you have any example that you can share with us?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 March 2024 20:09 UTC](https://discourse.nodered.org/t/link-to-another-tab-using-dashboard-button/11211/6 "2024-03-04T20:09:24Z")

</div>

Show us what you tried.

---

<div class="post-metadata">

**Author:** ![LilGrundy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lilgrundy/32/87875_2.png) [@LilGrundy](https://discourse.nodered.org/u/LilGrundy)\
**Post date:** [4 March 2024 22:21 UTC](https://discourse.nodered.org/t/link-to-another-tab-using-dashboard-button/11211/7 "2024-03-04T22:21:20Z")

</div>

In fact, I just tried another way and it worked for me, I have a tab with the name Menu, so in the change node I put JSON {"Tab": "Menu"}, and when I hit the ui\_button it works correctly, it redirects me Here I leave you my example.

```auto
[
    {
        "id": "ebc93ac2fac1d581",
        "type": "ui_button",
        "z": "bcfe12f0e599012a",
        "name": "",
        "group": "786d37a3.36fb18",
        "order": 0,
        "width": "3",
        "height": "1",
        "passthru": false,
        "label": "Menu",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "",
        "topicType": "str",
        "x": 350,
        "y": 1020,
        "wires": [
            [
                "23a7819cc5926172"
            ]
        ]
    },
    {
        "id": "b9a0ed86bf50e39a",
        "type": "ui_ui_control",
        "z": "bcfe12f0e599012a",
        "name": "",
        "events": "all",
        "x": 760,
        "y": 1020,
        "wires": [
            []
        ]
    },
    {
        "id": "23a7819cc5926172",
        "type": "change",
        "z": "bcfe12f0e599012a",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\"tab\":\"Menu\"}",
                "tot": "json"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 600,
        "y": 1020,
        "wires": [
            [
                "b9a0ed86bf50e39a"
            ]
        ]
    },
    {
        "id": "786d37a3.36fb18",
        "type": "ui_group",
        "name": "Grupo 1",
        "tab": "c72af65d.a85ef8",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "c72af65d.a85ef8",
        "type": "ui_tab",
        "name": "Tablero 1",
        "icon": "dashboard",
        "order": 1
    }
]

```

 ![imagen_2024-03-04_172115777](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/c/7ca281576fe217957f73d112390d3b42d55e584b.png)
