Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- button.fireEvent('click', button);
- 1)Create the event code in a function and call the function from both sides: btn.on("clic", ...) and from the code you want to simulate the click.
- 2)Use: btnView.btnEl.dom.click();
- Ext.create('Ext.Button', {
- text: 'Click me',
- renderTo: Ext.getBody(),
- handler: function() {
- alert('You clicked the button!');
- }
- });
- Ext.create('Ext.Button', {
- text: 'Click me',
- renderTo: Ext.getBody(),
- handler: someOnClickFunction
- });
- someOnClickFunction = function( aButton, aEvent, aeOpts)
- {
- // Do something here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement