var button = Ext.get('show-btn');
    button.on('click', function(){
  
        var win = new Ext.Window({
            title: 'Layout Window',
            closable:true,
            width:600,
            height:350,
            //border:false,
            plain:true,
            buttons: [{
               text: 'Save',
               handler: function(){
                   if(nav.getForm().isValid()){
                    nav.getForm().submit({
         url: 'uploadFile.htm',
         method:'POST',
                        waitMsg: 'Uploading your file...',
                        success: function(nav, o){
          popupMsg('Success', 'Processed file "'+o.result.file+'" on the server');
          dlgPopup.hide();
                        }, 
         failure: function() {
             popupMsg('Fail', 'Fail to upload file "'+o.result.file+'" on the server');
          dlgPopup.hide();
         }       
         
                    });
                   }
               }
           },{
      text:'Close',
      handler:function(){       
       win.close();       
      }
     }]
        });
        win.show(this);
 });
Wednesday, 15 October 2008
Subscribe to:
Post Comments (Atom)
 
 
No comments:
Post a Comment