# How can I send a message from a ui\_button inside an HTML template?

**URL:** <https://discourse.nodered.org/t/how-can-i-send-a-message-from-a-ui-button-inside-an-html-template/14152>\
**Category:** Dashboard\
**Created:** [8 August 2019 16:50 UTC](https://discourse.nodered.org/t/how-can-i-send-a-message-from-a-ui-button-inside-an-html-template/14152 "2019-08-08T16:50:40Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![tbdltee](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@tbdltee](https://discourse.nodered.org/u/tbdltee)\
**Post date:** [16 August 2019 13:26 UTC](https://discourse.nodered.org/t/how-can-i-send-a-message-from-a-ui-button-inside-an-html-template/14152/7 "2019-08-16T13:26:26Z")

</div>

the data-action key contain special character, i.e. - you need to put qoute char (') to make it work. It will be

`<md-button class="button save" ng-click="send({topic:'clicked', payload:'button was clicked', 'data-action':'save'})">SAVE</md-button>`

---

_[View the full topic](https://discourse.nodered.org/t/how-can-i-send-a-message-from-a-ui-button-inside-an-html-template/14152)._
