• extjs用iframe的问题


    项目中用extjs做前提
    系统的界面是
    左边用树做目录 右边用tabpanel做内容展示
    点击树节点的时候 在tabpanel添加新的tab

    JScript code
    var newTab = centerPanel.add(new Ext.Panel({ id : tabId, title : tabTitle, iconCls : "treeNodeLeafIcon", layout : 'fit', border : false, closable : true, listeners : { activate : this.onActiveTabSize, scope : this }, items : { html : "<iframe width="100%" height="100%" scrolling="auto" frameborder="0" src=http://topic.csdn.net/u/20100715/14//""+_link+"" ></iframe>" } }));

    在ie6 ff下是正常的
    不过就是在ie8下就出问题了
    当iframe引用的页面是用viewport布局的时候就没有显示内容
    点击别的tab再点击回来 viewport里面的内容有正常而来
    如果点击树的节点的话viewport的内容又不见了
    这个是不是extjs在ie8下的bug
    有没有人遇到这个问题的呢

     
     
    已经有8 个评论
      1. look 说:

        var newTab = centerPanel.add(new Ext.Panel({   id : tabId, //把id属性去掉试试   title : tabTitle,iconCls : "treeNodeLeafIcon",layout : ‘fit’,border : false,   closable : true,   listeners : {   activate : this.onActiveTabSize,   scope : this   },   items : {html : "<iframe width="100%" height="100%" scrolling="auto" frameborder="0" src=http://topic.csdn.net/u/20100715/14//""+_link+"/" ></iframe>"   }   }));

      2. my159 说:

        html: ‘<iframe id="iframe" src=http://topic.csdn.net/u/20100715/14//” + _link.url + ‘’ frameborder="0" scrolling="auto" style="border:0px none;height:100%; 100%;"></iframe>’

      3. wuwei04 说:

        CSS code

        如果id没有必须的用途,就不需要为组件添加id
        如果id一旦重复就会造成组件显示问题或是出现js冲突

      4. sbamd 说:

        试用了 还是老样子我这个代码在ie6和ff能正常跑的就是在ie8的时候出问题的

      5. jc2008_828 说:

        to 3id冲突的可能性不大   在ie6和ff下都正常有没有试过在ie8下 用tab调用iframe引用的页面用viewport的情况

      6. bobowanzi 说:

        弄了 几天 总算把问题解决了就是在页面上把第一句的doctype删掉就正常啦 这个问题只在ie8发生答案具体在这里http://bbs.misonsoft.com/thread-1941-1-1.html那这题当散分 来者有份  下周结贴

      7. 405290688 说:

        items : {html : "<iframe width="100%" height="100%" scrolling="auto" frameborder="0" src=http://topic.csdn.net/u/20100715/14//""+_link+"/" ></iframe>"   }这个写法我感觉有点问题,最好还是这样吧:items : [{html : "<iframe width="100%" height="100%" scrolling="auto" frameborder="0" src=http://topic.csdn.net/u/20100715/14//""+_link+"/" ></iframe>"   }]

      8. aw3fae 说:

        不是代码的问题,浏览器的问题,IE8是这样,我刚好前几天遇到过,我的解决方案是在首页加代码把IE浏览器的标准改了,无论客户用的什么IE,都是按照IE7的标准来的,希望对楼主有帮助在首页加入<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

  • 相关阅读:
    php反射类 ReflectionClass
    大写中文数字-財务
    Cookie/Session机制具体解释
    具体解释VB中连接access数据库的几种方法
    Hibernate Criterion
    hdu1151 Air Raid,DAG图的最小路径覆盖
    【收藏】十大Webserver漏洞扫描工具
    美国地名大全(美国城市名称英文、中文)
    图像切割之(五)活动轮廓模型之Snake模型简单介绍
    数据库索引的作用和长处缺点
  • 原文地址:https://www.cnblogs.com/zhwl/p/3858781.html
Copyright © 2020-2023  润新知