# Delete the OK/Cancel Notification Pop Up Window

**URL:** <https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958>\
**Category:** Dashboard\
**Created:** [9 December 2019 19:13 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958 "2019-12-09T19:13:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcelFinzi](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@MarcelFinzi](https://discourse.nodered.org/u/MarcelFinzi)\
**Post date:** [9 December 2019 19:13 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/1 "2019-12-09T19:13:59Z")

</div>

Hi everyone, i hope you can help me !  
I am using the OK/Cancel Notification in my Dashboard, because I want to see the Notification in the middle of the screen (for better visualization).  
My problem is, that I am using this dashboard only for a view, so i am not able to push the "OK" or "Cancel" button.  
Can i make a function to delete this Window if for example the msg is "0"?

Thanks!

---

<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:** [9 December 2019 19:15 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/2 "2019-12-09T19:15:48Z")

</div>

Hi

what does the last line of the info panel say ?

"Sending a blank payload will remove any active dialog without sending any data."

---

<div class="post-metadata">

**Author:** ![MarcelFinzi](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@MarcelFinzi](https://discourse.nodered.org/u/MarcelFinzi)\
**Post date:** [9 December 2019 19:17 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/3 "2019-12-09T19:17:51Z")

</div>

Hi,

I tried this, but the PopUp Window in my dashboard stays until i push a button...

---

<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:** [9 December 2019 19:21 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/4 "2019-12-09T19:21:58Z")

</div>

which version of dashboard do you have installed ?  
Simple flow that works on latest dashboard.

```auto
[{"id":"ffc4cc70.8ef54","type":"ui_toast","z":"ea593186.4918d","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":480,"y":720,"wires":[[]]},{"id":"af502370.b6a1d","type":"ui_button","z":"ea593186.4918d","name":"","group":"5749dfff.2a222","order":5,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Hello World","payloadType":"str","topic":"","x":150,"y":720,"wires":[["ffc4cc70.8ef54","7b276d83.b4bf84"]]},{"id":"7b276d83.b4bf84","type":"delay","z":"ea593186.4918d","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":220,"y":780,"wires":[["cfa0ce35.11646"]]},{"id":"cfa0ce35.11646","type":"change","z":"ea593186.4918d","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":780,"wires":[["ffc4cc70.8ef54"]]},{"id":"5749dfff.2a222","type":"ui_group","z":"","name":"Default","tab":"8d16f8ce.591d18","disp":true,"width":"6","collapse":false},{"id":"8d16f8ce.591d18","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![MarcelFinzi](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@MarcelFinzi](https://discourse.nodered.org/u/MarcelFinzi)\
**Post date:** [10 December 2019 06:40 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/5 "2019-12-10T06:40:02Z")

</div>

I have updated the version to 2.19.2.  
With an empty payload, the notification window also pops up (just with an empty message).

In your flow, the pop up window doesn't disappear, it opens another pop up window, where I have to press the OK button.

In my case, I want tho show Error Codes from a machine. So if an Error appears on the machine, the pop up window should show the error with the discription (i wrote another msg). If no Error is on the machine, it sends "0". I want if the error is "0" the pop up window closes automatically. But I don't know how to do that...

---

<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:** [10 December 2019 08:00 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/6 "2019-12-10T08:00:36Z")

</div>

You need to send a payload with nothing in it. Not a space or blank.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 December 2019 11:41 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/7 "2019-12-10T11:41:45Z")

</div>

> [@dceejay](#):
>
> "Sending a blank payload will remove any active dialog without sending any data."

> [@dceejay](#):
>
> You need to send a payload with nothing in it. Not a space or blank.

There seems to be a certain amount of ambiguity in the text. The difference between a blank payload and a payload containing blank is fairly subtle.

---

<div class="post-metadata">

**Author:** ![MarcelFinzi](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@MarcelFinzi](https://discourse.nodered.org/u/MarcelFinzi)\
**Post date:** [10 December 2019 12:11 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/8 "2019-12-10T12:11:30Z")

</div>

And how to send an empty payload??

---

<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:** [10 December 2019 12:17 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/9 "2019-12-10T12:17:04Z")

</div>

As per my example flow above  
Or a simple function

```auto
msg.payload = "";
return msg;

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 December 2019 14:11 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/10 "2019-12-10T14:11:01Z")

</div>

Oh, I thought it meant a payload of null, not an empty string.

---

<div class="post-metadata">

**Author:** ![MarcelFinzi](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@MarcelFinzi](https://discourse.nodered.org/u/MarcelFinzi)\
**Post date:** [18 December 2019 19:41 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/11 "2019-12-18T19:41:53Z")

</div>

Thank you !

Sent an empty payload and the Notification Windows disappeared !

---

<div class="post-metadata">

**Author:** ![lexeyfan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lexeyfan/32/16187_2.png) [@lexeyfan](https://discourse.nodered.org/u/lexeyfan)\
**Post date:** [15 January 2020 13:39 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/12 "2020-01-15T13:39:31Z")

</div>

Tell me please, I am sending an empty payload, it opens an empty pop-up message

```auto
[{"id":"219e5d54.a59c22","type":"ui_toast","z":"95458945.6a73c8","position":"dialog","displayTime":"3","highlight":"","sendall":false,"outputs":1,"ok":"OK","cancel":"","raw":true,"topic":"","name":"","x":720,"y":760,"wires":[[]]},{"id":"f109b22b.af523","type":"inject","z":"95458945.6a73c8","name":"","topic":"","payload":"Hello","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":330,"y":740,"wires":[["b5da7e35.27ac9","219e5d54.a59c22"]]},{"id":"7b15c3ff.fa506c","type":"function","z":"95458945.6a73c8","name":"","func":"msg.payload='';\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":820,"wires":[["219e5d54.a59c22"]]},{"id":"b5da7e35.27ac9","type":"delay","z":"95458945.6a73c8","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":450,"y":860,"wires":[["7b15c3ff.fa506c"]]}]

```

why?  
15 Jan 16:33:32 - [info] Node-RED version: v1.0.1  
15 Jan 16:33:32 - [info] Node.js version: v12.11.1

---

<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:** [15 January 2020 13:47 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/13 "2020-01-15T13:47:00Z")

</div>

Which version of node-red-dashboard ? This was fixed in 2.19.3.

---

<div class="post-metadata">

**Author:** ![JFL](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@JFL](https://discourse.nodered.org/u/JFL)\
**Post date:** [1 July 2020 08:22 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/14 "2020-07-01T08:22:25Z")

</div>

Hello, I upgraded dashboard to 2.22.1, and sending a empty payload close the first notification but create a new one , empty with the OK button

Any help ? thanks

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 July 2020 08:59 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/15 "2020-07-01T08:59:32Z")

</div>

Hi JFL, welcome to the forum.  
Can you create a small flow (just a few nodes) showing the problem you are seeing (it is not clear to me from your question). Then read [this post](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506) to see how to share it here. Tell us what the flow does and what it should do.

---

<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:** [1 July 2020 09:05 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/16 "2020-07-01T09:05:18Z")

</div>

Does this not work ?

```auto
[{"id":"6739e8d1.ae8b18","type":"inject","z":"8418773.2570188","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello world","payloadType":"str","x":170,"y":200,"wires":[["7f28afc.0b0c25"]]},{"id":"7f28afc.0b0c25","type":"ui_toast","z":"8418773.2570188","position":"dialog","displayTime":"10","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":390,"y":200,"wires":[[]]},{"id":"4eac0162.49449","type":"inject","z":"8418773.2570188","name":"clear","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":150,"y":260,"wires":[["7f28afc.0b0c25"]]}]

```

---

<div class="post-metadata">

**Author:** ![hrsht007](https://avatars.discourse-cdn.com/v4/letter/h/97f17d/32.png) [@hrsht007](https://discourse.nodered.org/u/hrsht007)\
**Post date:** [9 September 2020 09:49 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/17 "2020-09-09T09:49:37Z")

</div>

@dceejay hi, on using your flow i am getting popup in **localhost:1880/ui**  
but i want popup to come in **localhost/mui** (Mdashboard)  
i replaced ui\_toast with mui\_toast,but no popup is coming

_Basically my requirement is to give popup on invalid date selection from date\_picker._

Nodered version -1.0.5

---

<div class="post-metadata">

**Author:** ![sniicker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniicker/32/56525_2.png) [@sniicker](https://discourse.nodered.org/u/sniicker)\
**Post date:** [18 August 2021 07:43 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/18 "2021-08-18T07:43:10Z")

</div>

So i also wanted do delete the notification, but when i send a clear msg, the notif. node sends a payload with the cancel properties. Thats not what i suspected, because help says it would send nothing?? Any Help?

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c9b883096aa1f03be1be57a30fd187b7e6e604fb.png)

dashboard V2.30.0  
NR V2.0.5

Same problem: when i will send a new notif. the first one will send a cancel property. That's not a good behaviour!

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/870044f70d3a0965eae5eb18804edf0d262b61c9.png)

```auto
[{"id":"d538add5d4364025","type":"ui_toast","z":"ef61e13a9f9a7a76","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"Cancel","raw":false,"topic":"Test","name":"","x":1010,"y":220,"wires":[["870cfec597764f65"]]},{"id":"870cfec597764f65","type":"debug","z":"ef61e13a9f9a7a76","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1190,"y":220,"wires":[]},{"id":"92581aa080f0e07a","type":"inject","z":"ef61e13a9f9a7a76","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Nachricht 1","payloadType":"str","x":730,"y":220,"wires":[["d538add5d4364025","17b1facb1b7d46b4"]]},{"id":"79d999c7d1149819","type":"inject","z":"ef61e13a9f9a7a76","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":790,"y":300,"wires":[["d538add5d4364025","24b64b3a4fc95015"]]},{"id":"17b1facb1b7d46b4","type":"debug","z":"ef61e13a9f9a7a76","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":890,"y":180,"wires":[]},{"id":"24b64b3a4fc95015","type":"debug","z":"ef61e13a9f9a7a76","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":990,"y":300,"wires":[]},{"id":"a9e5f618fb321444","type":"ui_toast","z":"ef61e13a9f9a7a76","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"Cancel","raw":false,"topic":"Test","name":"","x":1010,"y":460,"wires":[["4ebad3d49f119cb9"]]},{"id":"4ebad3d49f119cb9","type":"debug","z":"ef61e13a9f9a7a76","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1190,"y":460,"wires":[]},{"id":"df4722c6e0bc0f58","type":"inject","z":"ef61e13a9f9a7a76","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Nachricht 2","payloadType":"str","x":730,"y":460,"wires":[["a9e5f618fb321444","82eb2247c6a99580"]]},{"id":"1c5e9b5779e40714","type":"inject","z":"ef61e13a9f9a7a76","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":790,"y":540,"wires":[["a9e5f618fb321444","10e636d8167050fa"]]},{"id":"82eb2247c6a99580","type":"debug","z":"ef61e13a9f9a7a76","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":890,"y":420,"wires":[]},{"id":"10e636d8167050fa","type":"debug","z":"ef61e13a9f9a7a76","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":990,"y":540,"wires":[]}]

```

@dceejay Do you know something about that? Could you help me?

---

<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:** [19 August 2021 08:04 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/19 "2021-08-19T08:04:10Z")

</div>

Why is this not a good behaviour ? You can only have one notification open. If you send a second you are cancelling the first.  
Likewise if you automatically remove it (first use case) then the flow needs to know you have removed it so needs some feedback. I will correct the help info.

---

<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:** [19 August 2021 08:23 UTC](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958/20 "2021-08-19T08:23:08Z")

</div>

Mui is not maintained by me. You would need to contact the author of that alternative dashboard

[Next page](https://discourse.nodered.org/t/delete-the-ok-cancel-notification-pop-up-window/18958.md?page=2)
