# Perspective Button onClick Action scripting

**URL:** <https://forum.inductiveautomation.com/t/perspective-button-onclick-action-scripting/70493>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [March 1, 2023, 6:20pm UTC](https://forum.inductiveautomation.com/t/perspective-button-onclick-action-scripting/70493 "2023-03-01T18:20:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [March 3, 2023, 5:27pm UTC](https://forum.inductiveautomation.com/t/perspective-button-onclick-action-scripting/70493/2 "2023-03-03T17:27:46Z")

</div>

Momentary push buttons through HMIs are not recommended. This thread will lead to discussions about them:

> [@HMI Momentary button Gets stuck with N/O Bit of PLC](https://forum.inductiveautomation.com/t/hmi-momentary-button-gets-stuck-with-n-o-bit-of-plc/21388):
>
> [image] I have two dynamically tagged momentary button for each of this START and STOP bit. Some reason, most of the time, B10.0 get stuck and latched in PLC, this causes not able to shut the motor down. Its control value is assigned to its respective tag as bidirectional with 2.5 sec, but still it gets hung up. Any one experienced this type of problem or I am doing some thing wrong. ?

Or just all these threads (notice all the problems they tend to have):  
[https://forum.inductiveautomation.com/search?q=momentary%20push%20button](https://forum.inductiveautomation.com/search?q=momentary%20push%20button)

However, if you have to, you could use [system.tag.writeBlocking](https://docs.inductiveautomation.com/display/DOC81/system.tag.writeBlocking) in a Button's `onMouseDown` and `onMouseUp` events. I would personally not do it this way.

---

_[View the full topic](https://forum.inductiveautomation.com/t/perspective-button-onclick-action-scripting/70493)._
