# How can I show a popup either image or text in node-red dashboard

**URL:** https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572
**Category:** Dashboard
**Created:** [30 September 2020 14:02 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572 "2020-09-30T14:02:16Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)
#### Post date: [30 September 2020 14:02 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/1 "2020-09-30T14:02:17Z")

</div>

how can I show a popup either image or text in node-red dashboard

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [30 September 2020 14:16 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/2 "2020-09-30T14:16:18Z")

</div>

Use the dashboard notification node

---

<div class="post-metadata">

### Author: ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)
#### Post date: [30 September 2020 14:24 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/3 "2020-09-30T14:24:48Z")

</div>

thank you very much, didn't know anything about it

---

<div class="post-metadata">

### Author: ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)
#### Post date: [1 October 2020 06:15 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/4 "2020-10-01T06:15:10Z")

</div>

can i use a picture for notification?

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [1 October 2020 06:27 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/5 "2020-10-01T06:27:48Z")

</div>

From the node info  
" Accept raw HTML/JavaScript input in msg.payload to format popup."  
So you should be able to display an image using html

---

<div class="post-metadata">

### Author: ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)
#### Post date: [1 October 2020 07:30 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/6 "2020-10-01T07:30:13Z")

</div>

can you please tell me the code for function?

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [1 October 2020 07:51 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/7 "2020-10-01T07:51:16Z")

</div>

> **[HTML Images](https://www.w3schools.com/html/html_images.asp)**

  

> **[Tryit Editor v3.6](https://www.w3schools.com/html/tryit.asp?filename=tryhtml_images_float)**

---

<div class="post-metadata">

### Author: ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)
#### Post date: [1 October 2020 08:39 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/8 "2020-10-01T08:39:13Z")

</div>

not the HTML code,

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/7/57abfe08539d792499eb6fda226d1f8ecbee167e.png)

or the code for function:  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/25ecd9e231200e81effa63f4a7796a4bb1d29f33.png)

```auto
[{"id":"ac6b35e3.5028f","type":"inject","z":"5e6253ed.de8d9c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"360","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":360,"wires":[["23cf2170.805e26","dd1d5e4f.9df498","4b3d69ca.edff4","97ea56ae.90e4a8"]]},{"id":"ffc51f3d.9fb2c","type":"debug","z":"5e6253ed.de8d9c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1110,"y":180,"wires":[]},{"id":"43f76cab.45d814","type":"ui_text","z":"5e6253ed.de8d9c","d":true,"group":"6209999e.5b1f8","order":12,"width":8,"height":1,"name":"Restmüll","label":"","format":"<font size=6><font color=grey>{{payload[0].date}}{{msg.payload[0].summary}}","layout":"row-center","x":1100,"y":240,"wires":[]},{"id":"dd1d5e4f.9df498","type":"ical-upcoming","z":"5e6253ed.de8d9c","confignode":"f2a499cf.b09a4","cron":"","timeout":"","name":"Restmüll","offset":"","endpreview":"17","endpreviewUnits":"days","pastview":"","pastviewUnits":"days","trigger":"match","filter":"Restmüll","x":520,"y":260,"wires":[["43f76cab.45d814","49f392f8.ca0e34","eeda55ad.840d7","f25a5328.2e4698"]]},{"id":"49f392f8.ca0e34","type":"ui_toast","z":"5e6253ed.de8d9c","position":"bottom right","displayTime":"120","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":true,"topic":"home_new_in.png","name":"test","x":1010,"y":120,"wires":[],"inputLabels":["12"]},{"id":"eeda55ad.840d7","type":"function","z":"5e6253ed.de8d9c","name":"","func":"msg.payload = (msg.payload[0].date);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":830,"y":220,"wires":[["49f392f8.ca0e34","ffc51f3d.9fb2c"]]},{"id":"f25a5328.2e4698","type":"function","z":"5e6253ed.de8d9c","name":"","func":"var pic = \"home_new_in.png\";\nmsg.payload = pic;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":690,"y":140,"wires":[["49f392f8.ca0e34"]]},{"id":"6209999e.5b1f8","type":"ui_group","z":"","name":"Default","tab":"","disp":true,"width":"6","collapse":true},{"id":"f2a499cf.b09a4","type":"ical-config","z":"5e6253ed.de8d9c","url":"/root/.node-red/public/12.ics","username":"","password":"","caldav":"false","name":"12.ics","language":"de","replacedates":true,"calendar":"","pastWeeks":"0","futureWeeks":"4"}]

```

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [1 October 2020 08:42 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/9 "2020-10-01T08:42:11Z")

</div>

Sorry confused, what code do you want?

example

```auto
[{"id":"7533350a.0a63a4","type":"ui_toast","z":"4484ee28.caa3c","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":true,"topic":"","name":"","x":260,"y":600,"wires":[]},{"id":"583937f0.9ecdd8","type":"ui_button","z":"4484ee28.caa3c","name":"","group":"165e1e1a.e752fa","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":240,"y":520,"wires":[["d24370e8.0964d8"]]},{"id":"d24370e8.0964d8","type":"change","z":"4484ee28.caa3c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"<img src=\"https://homepages.cae.wisc.edu/~ece533/images/airplane.png\">","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":560,"wires":[["7533350a.0a63a4"]]},{"id":"165e1e1a.e752fa","type":"ui_group","z":"","name":"Default","tab":"f9b58883.fa613","order":1,"disp":true,"width":"12","collapse":false},{"id":"f9b58883.fa613","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [1 October 2020 09:09 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/10 "2020-10-01T09:09:43Z")

</div>

you have the `Accept raw HTML/Javascript input to format popup` checked off, but you are not sending valid HTML, all you have sent is the name of the file. You would need an `<img src=.....>` html statement as @E1cid shows in his example

---

<div class="post-metadata">

### Author: ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)
#### Post date: [1 October 2020 09:42 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/11 "2020-10-01T09:42:16Z")

</div>

@E1cid  
@zenofmud  
thank you very much that helps me a lot.

---

<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: [31 October 2020 09:42 UTC](https://discourse.nodered.org/t/how-can-i-show-a-popup-either-image-or-text-in-node-red-dashboard/33572/12 "2020-10-31T09:42:19Z")

</div>

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