# On 'reply' click call

**URL:** <https://meta.discourse.org/t/on-reply-click-call/149603>\
**Category:** Development\
**Created:** [28 באפריל,‏ 2020,‏ 2:30pm UTC](https://meta.discourse.org/t/on-reply-click-call/149603 "2020-04-28T14:30:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varsii](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@Varsii](https://meta.discourse.org/u/Varsii)\
**Post date:** [28 באפריל,‏ 2020,‏ 2:30pm UTC](https://meta.discourse.org/t/on-reply-click-call/149603/1 "2020-04-28T14:30:59Z")

</div>

Hi all 🙂  
I was wondering how can I add a call method when clicking on the ‘reply’ button in some topic? I want to add some message to pop-up if some conditions are true.  
Thank you.

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [4 באוקטובר,‏ 2020,‏ 1:44pm UTC](https://meta.discourse.org/t/on-reply-click-call/149603/2 "2020-10-04T13:44:44Z")

</div>

I’m also interested in this.

---

<div class="post-metadata">

**Author:** ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)\
**Post date:** [4 באוקטובר,‏ 2020,‏ 4:58pm UTC](https://meta.discourse.org/t/on-reply-click-call/149603/3 "2020-10-04T16:58:16Z")

</div>

I think `api.onAppEvent("page:compose-reply", callback)` should work

> <https://github.com/discourse/discourse/blob/01a9c57dcbea7dae5aaf4f34b82f1f52f060513b/app/assets/javascripts/discourse/app/templates/topic.hbs#L146>

> <https://github.com/discourse/discourse/blob/01a9c57dcbea7dae5aaf4f34b82f1f52f060513b/app/assets/javascripts/discourse/app/controllers/topic.js#L487>

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [4 באוקטובר,‏ 2020,‏ 5:28pm UTC](https://meta.discourse.org/t/on-reply-click-call/149603/4 "2020-10-04T17:28:20Z")

</div>

Thanks! It works indeed. 👍  
Couldn’ find the event for creating a new topic though.

---

<div class="post-metadata">

**Author:** ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)\
**Post date:** [4 באוקטובר,‏ 2020,‏ 5:43pm UTC](https://meta.discourse.org/t/on-reply-click-call/149603/5 "2020-10-04T17:43:02Z")

</div>

Find the `create-topic-button` template and Class you may discove something, also [Installing the Inspector - Ember Inspector - Ember Guides](https://guides.emberjs.com/release/ember-inspector/installation/) can help you resolve something like that.
