开发者

Problem in clicking Ext JS button second time

开发者 https://www.devze.com 2023-03-11 04:22 出处:网络
On clicking an \'add\' button my program opens a window but when a closes that window and again click on \'add\' button window doesn\'t show up. Here is my code to show window-

On clicking an 'add' button my program opens a window but when a closes that window and again click on 'add' button window doesn't show up. Here is my code to show window-

var AddURLWindow = new Ext.Window ({
            title       : 'XXXX',
            width       : 550,
            border      : 'false',
            height      : 160,
            id      : 'win',
            name        : 'win',
            bodyStyle   : 'background-color:#fff;padding: 5px',
            autoScroll  : true,
            items: [
                urlContainer
                ],
            buttonAlign : 'right',                                          // buttons aligned to the right
            buttons     :[{
                text        : 'Add URL'
               //handler    : saveRules
            },{
              text      : 'Cancel',
              handler   : closeWindow
            }]                                                  // buttons of the form
    });

Code for urlContainer is-

var urlContainer = {
          xtype         : 'fieldset',
          flex          : 1,
          border        : false,
          hideBorders   : false,
          autoHeight    : true,
          labelWidth    : 70,
          height        : 42,
          defaultType   : 'field',
          defaults      : {
            anchor      : '100%',
            allowBlank  : false,
            border      : 'false'
          },
          items : [
                nameTextField
          ]
    };

Code for nameTextField is-

 var nameTextField =开发者_如何学Go new Ext.form.TextField({
        border          : false,
        fieldLabel      : 'Name',
        name            : 'first',
        //    id                : 'id-name',
        emptyText       : 'Entesr URL',
        anchor          : '100%',
        width           : '400',
        allowBlank      :  false
    });

Any help?

0

精彩评论

暂无评论...
验证码 换一张
取 消