title: Disable a button after save in extjs4.2
body: <p>I am saving three tabs on a one save button, however on the click of the save button i'm trying to disable the button while saving the data in the three tabs to prevent the user from clicking several times on the save button, because i have a timeout in my function. Any help on how to do so?</p>
  
  <pre><code>Ext.onReady(function(){
  
  
  
      tabPanel = Ext.create('Ext.tab.Panel', {
          region: 'center',
          activeTab: 0,
          autoScroll: true,
          tbar: [{
              xtype: 'button',
              deferredRender : false, 
              handler:function(){
              save("frm_A", save);
              },    
  
  
          }],
          items: [
                  {   
                      id:"panel_A",
                      html: "&lt;iframe src= '"+A_url +"' width='100%' height='100%' id='frm_A' name='frm_A' frameborder=0 /&gt;",        
                  },{
                      id:"panel_B",
                      html: "&lt;iframe src='"+B_url+"'  width='100%' height='100%' id='frm_B' name='frm_B' frameborder=0 /&gt;",
  
                  },{
                      id:"panel_C",
                      html: "&lt;iframe src= '"+C_url+"' width='100%' height='100%' id='frm_C' name='frm_C' frameborder=0 /&gt;",
                  }]
  
          });
  
  
      viewport = new Ext.Viewport({
          layout:'border',
          items:[tabPanel]
      });
  
  
  
      function save(record){
  
          var Aid = record.getField("NUMBER").getRealValue();
          var currentTab = tabPanel.getActiveTab();
                tabPanel.setActiveTab(1);
                tabPanel.setActiveTab(2);
                tabPanel.setActiveTab(0);
                tabPanel.setActiveTab(currentTab);
  
          var B= window.frames["frm_B"];
          var C= window.frames["frm_C"];
  
          setTimeout(function(){   
              try {
              B.RECORD.getField("ID").setRealValue(Aid);
              C.RECORD.getField("ID").setRealValue(Aid);
              B.RECORD.update();
              C.RECORD.update();
  
              parent.refreshGrid();
              parent.win.close();
          }
          catch(e){
              showError(e);
          }
          }, 4000);
  
      }
  
  
  });
  </code></pre>