title: How to fire an click event on the "OK" of Ext.Msg.alert?
body: <p>After a form is saved successfully, an alert is fired and looks as the following:</p>
  
  <pre><code>Ext.Msg.alert('Success','Changes saved successfully');
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/tFZS4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tFZS4.jpg" alt="enter image description here"></a></p>
  
  <p>How to fire an <code>click event</code> on the "OK" through <code>javascript</code> or <code>extjs</code>?</p>
  
  <p>Refer to <a href="https://stackoverflow.com/questions/29834028/programmatically-call-handler-of-a-button-event?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">Programmatically call handler of a button event?</a>, the following worked, however it looks a bad idea to find out the <code>button-id</code> that is generated by <code>extjs</code>.</p>
  
  <pre><code>var btn = Ext.getCmp('button-id');
  var e = null; // we don't have any event, so let's use nothing
  Ext.callback(btn.handler, btn.scope, [btn, e], 0, btn);
  </code></pre>