View Full Version : detect if ext button is pressed

20 Jun 2013, 6:14 AM
I have a javascript applicatin [1] with 'Ext.js' and add a button to execute some code if it was pressed or not.
When it was pressed its all right but when i click out the controls that i want 'deactivate' remain activate.
Anybody know the problem? The 'else' not result...


[1] <http://pastebin.com/a1EypviE>

Tim Toady
20 Jun 2013, 10:13 AM
I don't understand your question, but looking at your code I assume you are meaning that the variable 'toogled' is always true. This is because the first parameter passed to handler is not the toggled state, it is the button itself. Perhaps you are wanting the toggle event where the second param is the toggle state?