# Help with button and iframe for a news feed

**URL:** <https://discourse.nodered.org/t/help-with-button-and-iframe-for-a-news-feed/39415>\
**Category:** General\
**Created:** [20 January 2021 01:56 UTC](https://discourse.nodered.org/t/help-with-button-and-iframe-for-a-news-feed/39415 "2021-01-20T01:56:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [20 January 2021 01:56 UTC](https://discourse.nodered.org/t/help-with-button-and-iframe-for-a-news-feed/39415/1 "2021-01-20T01:56:43Z")

</div>

Hi all,

I created a news feed for my dashboard which works well, however running it in kiosk mode is a problem.  
If a user clicks on the thumb nail using code below it it takes them to the web link, but there is no back button!!!  
`<a target="_blank" href="{{msg.payload[0].link}}"> <img width="100%" src="{{msg.payload[0].thumb}}"/></a>`

I think the answer would be to open the link in another node red tab using iframe ?

So the ui template button would need to display the thumb as now but also output the incoming link as a payload when clicked. Then a function node to send them to another tab and load the page in the iframe, keeping users within the dashboard.

I have done a lot of searching but can't seem to find a similar example, but then I'm not really sure what to search for 😉

I could really do with some help as I haven’t yet managed to get the image button working let alone the link payload or iframe part.

TIA

---

<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:** [20 January 2021 09:37 UTC](https://discourse.nodered.org/t/help-with-button-and-iframe-for-a-news-feed/39415/2 "2021-01-20T09:37:17Z")

</div>

The built in dashboard link item has several options  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/f/3f5ede4632a8db07cef8f330a099189379fc3ee5.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fd922adc45766d7427ece1a5211223c0bcf10895.png)  
that may help

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [20 January 2021 16:49 UTC](https://discourse.nodered.org/t/help-with-button-and-iframe-for-a-news-feed/39415/3 "2021-01-20T16:49:41Z")

</div>

Thanks that works ok for a fixed link, but I need a dynamic button fed with new links on rotation.  
I have it working using standard html above.

The following code doesn't work but I think shows what I need to achive, could you help with correct syntax please ?

```auto

<md-button class="vibrate touched filled" ng-bind-html="msg.payload[0].thumb" ng-click="send(msg.payload[0].link)"> 

<img hight"100%" src="{{msg.payload[0].thumb}}"/>

</md-button> 

```

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [20 January 2021 17:53 UTC](https://discourse.nodered.org/t/help-with-button-and-iframe-for-a-news-feed/39415/4 "2021-01-20T17:53:07Z")

</div>

OK got the picture working now but still not getting the link payload when clicked guess its just syntax, any ideas?

```auto

<md-button class="vibrate touched filled" ng-click="send( { payload: {{msg.payload[0].link}} })"> 

<img src="{{msg.payload[0].thumb}}" width="100%"/>

</md-button> 

```

---

<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:** [21 March 2021 17:53 UTC](https://discourse.nodered.org/t/help-with-button-and-iframe-for-a-news-feed/39415/5 "2021-03-21T17:53:17Z")

</div>

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