# Configuring a dashboard tab in response to a URL

**URL:** <https://discourse.nodered.org/t/configuring-a-dashboard-tab-in-response-to-a-url/19106>\
**Category:** General\
**Created:** [13 December 2019 10:39 UTC](https://discourse.nodered.org/t/configuring-a-dashboard-tab-in-response-to-a-url/19106 "2019-12-13T10:39:33Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Nxito](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nxito/32/88293_2.png) [@Nxito](https://discourse.nodered.org/u/Nxito)\
**Post date:** [16 December 2019 08:20 UTC](https://discourse.nodered.org/t/configuring-a-dashboard-tab-in-response-to-a-url/19106/6 "2019-12-16T08:20:14Z")

</div>

I send you the http part with the iframe and a function in which you only have to add the position of the dashboard board (I recommend taking a look at the post I published on the dashboard menu variable)

```auto
[{"id":"2935e9a4.c5ba56","type":"http in","z":"dfd21047.842e8","name":"","url":"/mydashtest","method":"get","upload":false,"swaggerDoc":"","x":980,"y":740,"wires":[["39ef8038.2ee7"]]},{"id":"f7744679.470738","type":"http response","z":"dfd21047.842e8","name":"","statusCode":"","headers":{},"x":1370,"y":840,"wires":[]},{"id":"d52fbc17.07c9e","type":"template","z":"dfd21047.842e8","name":"Iframe","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<body>\n <table><tr><th>\n <iframe id=\"MyIFrame\" align=\"left\" > Tu navegador no soporta iframes</iframe> </th>\n </tr></table>\n</body>\n\n<style>\n #MyIFrame {border: 0; top:0px; bottom:0px; width:100vw; height:100vh; overflow:hidden; }\n html{overflow:hidden;} \n body{margin:0px;}\n</style>\n\n<script>\n\nvar host=window.location.host\nvar dashboardDir=\"ui\"\nvar index={{payload}}\nvar tabName=window.location.href\nconsole.log(tabName)\n\nvar URL=\"http://\"+host+\"/\"+dashboardDir+\"/#!/\"+index;\nconsole.log(URL)\nvar URLtabName=\"http://\"+host+\"/\"+dashboardDir+\"/#!/\"+index;\nvar iframe = document.getElementById(\"MyIFrame\");\niframe.src = URL;\n\nconsole.log(iframe)\n\n\n</script>\n\n\n\n","output":"str","x":1170,"y":840,"wires":[["f7744679.470738"]]},{"id":"39ef8038.2ee7","type":"function","z":"dfd21047.842e8","name":"indexOf My Tab","func":"\nmsg.payload=2\nreturn msg;","outputs":1,"noerr":0,"x":1040,"y":800,"wires":[["d52fbc17.07c9e"]]}]

```

---

_[View the full topic](https://discourse.nodered.org/t/configuring-a-dashboard-tab-in-response-to-a-url/19106)._
