# Button sometimes doesn´t work

**URL:** <https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271>\
**Category:** Ignition\
**Created:** [September 17, 2013, 2:51pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271 "2013-09-17T14:51:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![cvaldi](https://avatars.discourse-cdn.com/v4/letter/c/439d5e/32.png) [@cvaldi](https://forum.inductiveautomation.com/u/cvaldi)\
**Post date:** [September 17, 2013, 2:51pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/1 "2013-09-17T14:51:28Z")

</div>

Hi, i’m having a problem with a button. Occasionally in some client the button doesn´t do anything when it is pressed while all others components of the window does work. If I open another client with the same window the button works.  
The button is used to go from one step to another in the process so it is going from visible to not visible and viceversa all the time, but it is always enabled.

I’m using Ignition v7.5.4, and Java 6.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [September 24, 2013, 4:24pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/2 "2013-09-24T16:24:47Z")

</div>

Are you using the actionPerformed event on the button or something else like the mouseClicked event?

---

<div class="post-metadata">

**Author:** ![cvaldi](https://avatars.discourse-cdn.com/v4/letter/c/439d5e/32.png) [@cvaldi](https://forum.inductiveautomation.com/u/cvaldi)\
**Post date:** [October 1, 2013, 10:05pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/3 "2013-10-01T22:05:51Z")

</div>

I’m using actionPerformed event.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [October 1, 2013, 10:32pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/4 "2013-10-01T22:32:31Z")

</div>

The actionPerformed event should always work (there is a case when mouseClicked wouldn’t), what makes you think that it isn’t working? Is there an error when you press it? In the client, you can see errors by going to the menu bar -\> help -\> console.

---

<div class="post-metadata">

**Author:** ![cvaldi](https://avatars.discourse-cdn.com/v4/letter/c/439d5e/32.png) [@cvaldi](https://forum.inductiveautomation.com/u/cvaldi)\
**Post date:** [October 2, 2013, 9:18pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/5 "2013-10-02T21:18:07Z")

</div>

Thanks for your answer Robert.

Unfortunately, this problem is very occasional and had been reported from plant operators, so I didn’t have the chance to check if there are errors in the console. They go throught this situacion by opening a new client and pressing the button from there. I’m tring to get more information about the problem, like if the button looks like pressed when it is pressed or if the problem persist after some time.

I’ will let you know if i get more information.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [October 2, 2013, 9:44pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/6 "2013-10-02T21:44:58Z")

</div>

Sounds good.

---

<div class="post-metadata">

**Author:** ![pbrandt](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@pbrandt](https://forum.inductiveautomation.com/u/pbrandt)\
**Post date:** [February 10, 2014, 1:38am UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/7 "2014-02-10T01:38:57Z")

</div>

I have experienced the very same problem. I have a button locked up and with a seperate client on the same computer it works. i don’t see anything in the console with the current time. When the button does lock up it does not work until a different screen is called up then previous screen is re entered.  
I am using 7.6.3 and Java 7

Thanks

---

<div class="post-metadata">

**Author:** ![Luke.Stone](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@Luke.Stone](https://forum.inductiveautomation.com/u/Luke.Stone)\
**Post date:** [March 3, 2014, 6:36pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/8 "2014-03-03T18:36:17Z")

</div>

It would be nice to have a print statement on the first line. How about creating a memory tag and just writing the current time to it on the first line of the script, just so we have a simple test to see if any of the script is executing.

I experienced a similar problem once in Designer but I was unable to track down the root cause. I haven’t seen it since, I wonder if this is related. In my case all events stopped firing. Restarting the Designer ‘fixed’ it.

Is it just one button? Do other events seem to be firing off like normal? Is it always the same button?

---

<div class="post-metadata">

**Author:** ![pbrandt](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@pbrandt](https://forum.inductiveautomation.com/u/pbrandt)\
**Post date:** [March 3, 2014, 8:41pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/9 "2014-03-03T20:41:42Z")

</div>

I haven’t noticed it to be any one button in particular. The buttons will work fine most of the time, but occasionally not.

I just found an instance of this and quickly went to the console and found this. Not sure what it means if anything.

Thanks

---

<div class="post-metadata">

**Author:** ![Luke.Stone](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@Luke.Stone](https://forum.inductiveautomation.com/u/Luke.Stone)\
**Post date:** [March 3, 2014, 9:49pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/10 "2014-03-03T21:49:49Z")

</div>

That error is unrelated. It’s reporting that one of your modbus devices closed/reset the TCP connection between Ignition’s driver and itself. I’m guessing that device is probably powered off or otherwise unavailable.

If you still have the client open (in the “broken” state), navigate to it’s output console by going to Help \> Diagnostics \> Console. The project needs to have the “Hide Menu Bar” option turned off in order to access the console in runtime. We might get lucky and have some informative messages there.

---

<div class="post-metadata">

**Author:** ![Luke.Stone](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@Luke.Stone](https://forum.inductiveautomation.com/u/Luke.Stone)\
**Post date:** [March 4, 2014, 9:05pm UTC](https://forum.inductiveautomation.com/t/button-sometimes-doesn-t-work/7271/11 "2014-03-04T21:05:14Z")

</div>

We resolved the issue over a support call. For posterity’s sake - the button’s script was actually running but it was calling system.nav.swapTo() on a window that was improperly left open/maximized. When swapping windows, there must be exactly one maximized window open at a time. If you have multiple maximized windows opened then system.nav.swapTo() won’t work properly.
