# Put a navigation button with payload on the right side of titlebar

**URL:** <https://discourse.nodered.org/t/put-a-navigation-button-with-payload-on-the-right-side-of-titlebar/60885>\
**Category:** Dashboard\
**Created:** [6 April 2022 14:43 UTC](https://discourse.nodered.org/t/put-a-navigation-button-with-payload-on-the-right-side-of-titlebar/60885 "2022-04-06T14:43:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![OrangeRaspberry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/orangeraspberry/32/106946_2.png) [@OrangeRaspberry](https://discourse.nodered.org/u/OrangeRaspberry)\
**Post date:** [6 April 2022 14:43 UTC](https://discourse.nodered.org/t/put-a-navigation-button-with-payload-on-the-right-side-of-titlebar/60885/1 "2022-04-06T14:43:42Z")

</div>

I have an idea to implement this function after I found someone's solution from forum. May be a little bit stupid. 😂

I creat a template node link to a group.See below code.,

```auto
<style>
#my-refresh-button {
    background-color: #353f48; 
    color: #f6f6f6;
    border: none;
    font-size: 35px;
}
</style>
<script>
    var theScope = scope;
    var myButton = document.getElementById("my-refresh-button");
    if(!myButton) {
    var button = document.createElement('BUTTON');
    button.addEventListener('click', sendPayload);
    button.innerHTML ='≡'
    button.id = 'my-refresh-button'
    button.style.position = 'absolute'
    button.style.right = '5px'
     button.style.top = '-2px'
    var titleBar = document.getElementById("nr-dashboard-toolbar");
    titleBar.append(button);
    }
    function sendPayload(){
    theScope.send("1");
    }
</script>
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [6 May 2022 14:43 UTC](https://discourse.nodered.org/t/put-a-navigation-button-with-payload-on-the-right-side-of-titlebar/60885/2 "2022-05-06T14:43:45Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
