论坛首页 入门技术论坛

关于左侧树状菜单打开界面的目标区域定位问题

浏览 2940 次
该帖已经被评为新手帖
作者 正文
   发表时间:2008-05-13  
这几天刚开始搞EXT,问题重重,举步维艰,求教个问题,先谢谢了。
问题是这样的:
我把首页分成了上,下,左,右四个div区域,并在我的左Div里放了一颗树,不是EXT原装树。我想当我点击这棵树的菜单的时候,相应的界面能在我的右div里显示出来.我点击树菜单触发的js如下:
function doAction(url){
  parent.mainFrame.location.href = url;
}
这是以前frameset的写法~ 不知道现在应怎么改一下?

我的页面代码如下:
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/common/include/taglib.jsp"%>
<%@ include file="/common/include/cssjs.jsp"%>
<%@ include file="/common/include/extcssjs.jsp"%>
<html>
<head>
<title>Red门户网站通用平台 V 0.1</title>
<script type="text/javascript">
function doAction(url){
  parent.mainFrame.location.href = url;
 }
 
Ext.onReady(function(){
      new Ext.Viewport({
             layout:'border',
             items:[
                    new Ext.BoxComponent({
                         region:'north',
                         el: 'north',//填充指定id的区域内容到north区域,若不设该属性,请通过html:'内容',设置区域内容
                         height:35
                   }),new Ext.BoxComponent({
                         region:'south',
                         el: 'south',
                         height:0
                   }),{
                        region:'center',
                        title:'业务办理',
                        contentEl:'center'
                   },{
                       region:'west',
                       width: 200,
                       collapsible: true,
                       minSize: 100,
                       maxSize: 300,
                       split: true,
                       title: 'eRed门户网站通用平台 V 0.1',
                       contentEl: 'tree'
                   }]
            });
       });
</script>
<body>
<html:form action="/security.go" method="post">
<div id="north">
顶部
</div>
<div id="south"> 

</div>
<div id="center"> 
业务区域
</div>
${treeScript}
</html:form>
</body>
</html>
   发表时间:2008-05-13  
我找到解决办法了,加上如下代码
<div id="center">
<iframe name="mainFrame" width="100%" height="100%" frameborder="0"></iframe>
</div>

还有其他办法的望跟贴!
0 请登录后投票
   发表时间:2008-08-11  
谢了
刚好也也帮我解决了这个问题
0 请登录后投票
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics