首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Ajax >

ext超链接的有关问题

2013-09-07 
ext超链接的问题小弟初学EXT 想请教如何设置超链接点击以后跳到制定的页面呢 我想左边那个超链接显示在中

ext超链接的问题
小弟初学EXT 想请教如何设置超链接点击以后跳到制定的页面呢 我想左边那个超链接显示在中间面板上~
Ext.onReady(function() {  
      
    var productPanel = new Ext.Panel({  
                title : '    模块 1   ',  
                //layout : 'fit',  
                id:'productPanel',  
                defaults : {  
                    // applied to each contained panel  
                    bodyStyle : 'padding:0px'  
                },  
                layout: {  
                    type: 'accordion',  
                    animate: true  
                },   
                items : [{  
                            title : '水质部分',  
                            html : '<a href="http://www.baidu.com">这是一个超链接</a>' //这个点了以后页面会出现在中间面板上
                        }]
            });  
            
    var systemconfPanel= new Ext.Panel({  


                title : '    模块2    ',  
                //layout : 'fit',  
                id:'systemconfPanel',  
                defaults : {  
                    // applied to each contained panel  
                    bodyStyle : 'padding:0px'  
                },  
                layout: {  
                    type: 'accordion',  
                    animate: true  
                },  
                items : [{  
                            title : '系统初始化',  
                            html : '<p>这是系统初始化</p>'  
                        }, {  
                            title : '参数配置',  
                            html : '<p>这是参数配置</p>'  
                        }, {  
                            title : '知识管理',  


                            html : '<p>这是知识管理</p>'  
                        }]  
            });  
  
    var viewport = new Ext.Viewport({  
        layout : 'border',  
        renderTo : Ext.getBody(),  
        items : [//viewport的ITEM开始  
                //北方  
                {  
                    title : '<marquee width="400px">This is ext</marquee>',  
                    id : "north",  
                    region : 'north',  
                    xtype : 'panel',  
                    spilt : true,  
                    height : 120,  
                    html : '<P align="center"> 哈哈哈系统  </p>'  
                },  
                //西方  
                {  
                    title : '菜单',  
                    region : 'west',  


                    id : 'west', // see Ext.getCmp() below  
                    title : 'West',  
                    width: 200, // give east and west regions a width  
                    minSize: 175,  
                    maxSize: 400,  
                    margins: '0 0 0 0',  
                    collapsible: true,  
                    split: true,    
                    layout: 'fit', // specify layout manager for items  
                    items:           // 西部的ITEM开始 // this TabPanel is wrapped by another Panel so the title will be applied  
                        new Ext.TabPanel({  
                        activeTab : 0,  
                        width : 200,                         
                        defaults : {  
                            autoScroll : true  


                        },  
                        items :   
                        [productPanel,  
                        systemconfPanel  
                        ]  
  
                        })//tabPanel结束  
                          
                    //西部ITEM的结束  
                },  
                  
                //中间  
                {  
                    title : '中间',
                    region : 'center',  
                    xtype : 'panel',  
                    html : '<a id="hideit" href="http://www.baidu.com" mce_href="#">Toggle the west region</a>',  
                    spilt : true  
                }]  
            //viewport的ITEM结束     
    });  


  
    Ext.get("hideit").on('click', function() {  
                // get a reference to the Panel that was created with id = 'west-panel'   
                var w = Ext.getCmp('west');  
                // expand or collapse that Panel based on its collapsed property state  
                w.collapsed ? w.expand() : w.collapse();  
            });  
  
});   ext
[解决办法]
点击你的那个超链接触发一个方法,然后在刷新右边?的,放上你要的那个
[解决办法]
 items: [{
                title: '水质部分',
                html: '<a href="http://www.baidu.com" target="ifrMID">这是一个超链接</a>' //这个点了以后页面会出现在中间面板上
            }]





 //中间  
                {
                title: '中间',
                region: 'center',
                xtype: 'panel',
                html: '<iframe frameborder="0" marginheight="0" width="100%" height="100%" marginwidth="0" scrolling="auto" name="ifrMID"></iframe>',


                spilt: true
            }

热点排行