# Button in dashboard

**URL:** <https://community.grafana.com/t/button-in-dashboard/1556>\
**Category:** Dashboards\
**Created:** [June 27, 2017, 1:26pm UTC](https://community.grafana.com/t/button-in-dashboard/1556 "2017-06-27T13:26:49Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sohyun](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohyun](https://community.grafana.com/u/sohyun)\
**Post date:** [June 27, 2017, 1:26pm UTC](https://community.grafana.com/t/button-in-dashboard/1556/1 "2017-06-27T13:26:49Z")

</div>

I want to get skill.  
if button is clicked in dashboard, data(like gps coordinate) will be sent to somewhere. how can I get this skill?

If my explanation is not enough, ask me again,plz

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [June 27, 2017, 7:25pm UTC](https://community.grafana.com/t/button-in-dashboard/1556/2 "2017-06-27T19:25:21Z")

</div>

Using the Text panel in HTML mode, you can add any HTML and JavaScript.

![](https://us1.discourse-cdn.com/grafana/original/1X/d8cf3ed55e3c97d66dda488f8144bc21a903605d.png)

---

<div class="post-metadata">

**Author:** ![sohyun](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sohyun](https://community.grafana.com/u/sohyun)\
**Post date:** [June 30, 2017, 10:21am UTC](https://community.grafana.com/t/button-in-dashboard/1556/3 "2017-06-30T10:21:04Z")

</div>

thanks, but I want to use in Graph pannel. How can I use it?

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [June 30, 2017, 10:22am UTC](https://community.grafana.com/t/button-in-dashboard/1556/4 "2017-06-30T10:22:21Z")

</div>

Have you looked at Drill Down links?

[http://docs.grafana.org/features/panels/graph/#drilldown-detail-link](http://docs.grafana.org/features/panels/graph/#drilldown-detail-link)

---

<div class="post-metadata">

**Author:** ![bill2bill](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@bill2bill](https://community.grafana.com/u/bill2bill)\
**Post date:** [February 22, 2018, 2:46pm UTC](https://community.grafana.com/t/button-in-dashboard/1556/5 "2018-02-22T14:46:40Z")

</div>

`<button class="btn navbar-button gf-timepicker-nav-btn" onClick="location.href='insert url here'">A Button</button>`

You can also use grafanas css class 😃

---

<div class="post-metadata">

**Author:** ![rakhesha](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@rakhesha](https://community.grafana.com/u/rakhesha)\
**Post date:** [February 23, 2018, 11:14am UTC](https://community.grafana.com/t/button-in-dashboard/1556/6 "2018-02-23T11:14:35Z")

</div>

Where we need to add this code?

---

<div class="post-metadata">

**Author:** ![bill2bill](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@bill2bill](https://community.grafana.com/u/bill2bill)\
**Post date:** [February 27, 2018, 9:22am UTC](https://community.grafana.com/t/button-in-dashboard/1556/7 "2018-02-27T09:22:21Z")

</div>

Use daniellee post to see where to insert the code.

You create a text widget, select settings, options tab, mode html and insert the html code.

---

<div class="post-metadata">

**Author:** ![uzer](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/uzer/32/3532_2.png) [@uzer](https://community.grafana.com/u/uzer)\
**Post date:** [May 6, 2019, 10:02am UTC](https://community.grafana.com/t/button-in-dashboard/1556/8 "2019-05-06T10:02:17Z")

</div>

Can’t make it work. JS isn’t allowed now?

---

<div class="post-metadata">

**Author:** ![daniellee](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/daniellee/32/41_2.png) [@daniellee](https://community.grafana.com/u/daniellee)\
**Post date:** [May 6, 2019, 10:38am UTC](https://community.grafana.com/t/button-in-dashboard/1556/9 "2019-05-06T10:38:00Z")

</div>

It is turned off by default for text panels to improve security. If you want to turn it back on, then change this setting in your config file for Grafana:

> **[Configure Grafana | Grafana documentation](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/)**
>
> Configuration documentation

---

<div class="post-metadata">

**Author:** ![cbzakaria95](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@cbzakaria95](https://community.grafana.com/u/cbzakaria95)\
**Post date:** [August 26, 2019, 3:33pm UTC](https://community.grafana.com/t/button-in-dashboard/1556/10 "2019-08-26T15:33:55Z")

</div>

How to do this on grafana cloud ?

---

<div class="post-metadata">

**Author:** ![amirft1374](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@amirft1374](https://community.grafana.com/u/amirft1374)\
**Post date:** [January 25, 2022, 12:05am UTC](https://community.grafana.com/t/button-in-dashboard/1556/11 "2022-01-25T00:05:30Z")

</div>

Have you found any answers for your question?

---

<div class="post-metadata">

**Author:** ![grant2](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/grant2/32/42281_2.png) [@grant2](https://community.grafana.com/u/grant2)\
**Post date:** [January 25, 2022, 12:48am UTC](https://community.grafana.com/t/button-in-dashboard/1556/12 "2022-01-25T00:48:01Z")

</div>

I believe you cannot do this on your own as a Cloud subscriber since you do not have access to the config file.

You might be able to contact Grafana support and ask them if they can make the change to the config file to allow script tags in text panels.
