posts - 39,  comments - 19,  trackbacks - 0
一定要将全局定义名称在function外面,不然其它地方就访问不了呀。搞到我一头雾水!
附上代码:
    var panel;
    
function showAddPanel() {
                
if (!panel) {
                    panel 
= new Ext.Window( {
                        id:'panel',
                        el : 'panel',
                        layout : 'fit',
                        width : 
600,
                        height : 
500,
                        closeAction : 'hide',
                        plain : 
true,
                        items : 
new Ext.TabPanel( {
                            region : 'center',
                            border : 
false,
                            activeTab : 
0,
                            items : [ 
{
                                title : '客户信息',
                                autoScroll : 
true,
                                items : [afm]
                            }
{
                                title : '合作项目',
                                autoScroll : 
true
                            }
{
                                title : '相关报价',
                                autoScroll : 
true
                            }
{
                                title : '相关订单',
                                autoScroll : 
true
                            }
]
                        }
),
                        buttons : [ 
{
                            text : '保存'
                        }
{
                            text : '重置'
                        }
{
                            text : '关闭',
                            handler : 
function() {
                                panel.hide();
                            }

                        }
]
                    }
);
                }


                panel.show(
this);
            }
posted on 2007-12-05 16:47 阿门119 阅读(2768) 评论(2)  编辑 收藏 引用 网摘 所属分类: Ext

只有注册用户登录后才能发表评论。
网站导航: