Results 1 to 2 of 2

Thread: form in tabPanel but not show

  1. #1

    Default form in tabPanel but not show

    I put a formPanel in tabPanel, but it can't show, even I add show() on formPanel, it can't work,too.

    PHP Code:
        var doUpdate = function(){
            
    basicFrm.getForm().submit({
                
    method'POST',
                
    url'index.php',
                
    waitTitle'member',
                
    waitMsg'update...',
                
    success: function(formaction){
                    var 
    result Ext.util.JSON.decode(action.response.responseText);
                    
    Ext.Msg.alert('message'result.msg);
                },
                
    failure: function(formaction){
                    var 
    result Ext.util.JSON.decode(action.response.responseText);
                    
    Ext.Msg.alert('message'result.msg);
                }
            });
        };
        var 
    basicFrm = new Ext.FormPanel({
            
    id'basic',
            
    labelWidth:60,
            
    labelAlign:'right',
            
    borderfalse,
            
    defaults: {width230},
            
    defaultType'textfield',
            
    items: [{
                
    fieldLabel'nickname',
                
    name'nickname',
                
    id'nickname',
                
    value'<{$nickname}>'
            
    },{
                
    fieldLabel'fullname',
                
    name'fullname',
                
    id'fullname',
                
    value'<{$fullname}>'
            
    },{
                
    fieldLabel'email',
                
    name'email',
                
    id'email',
                
    value'<{$email}>'
            
    },{
                
    xtype'hidden',
                
    name'id',
                
    value'<{$id}>'
            
    },{
                
    xtype'hidden',
                
    name'action',
                
    value'update'
            
    },{
                
    xtype'hidden',
                
    name'controller',
                
    value'member'
            
    },{
                
    xtype'hidden',
                
    name'sub_controller',
                
    value'register'
            
    }],
            
    buttons:[{
                
    id:'send',
                
    text:'update',
                
    scopethis,
                
    handlerdoUpdate
            
    }]    
        });
        var 
    tabs = new Ext.TabPanel({
            
    renderTo'profile',
            
    //width: 450,
            //height: 450,
            
    activeTab0,
            
    frametrue,
            
    defaults:{autoHeighttrue},
            
    items:[{
                
    title'basic',
                
    ctCls'basic_frm',
                
    layout:'fit',
                
    itemsbasicFrm
            
    },{
                
    title'advanced',
                
    contentEl'advanced'
            
    }]
        });
    }); 




    the basic tab show nothing, but the advanced tab show the contentEl of <div id='advanced'> normally.
    how can I show the form in the tab?

    best regards
    ives
    Attached Images Attached Images

  2. #2
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996

    Default

    You've violated the cardinal rule ye shall not overnest read more here:
    http://extjs.com/deploy/dev/docs/?class=Ext.Container

    Code:
    items:[
        basicFrm,
        {
        title: 'advanced',            
        contentEl: 'advanced'
    }]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •