extjs window js引入问题

现在使用的版本

extjs3.3.1

在extjs中window加载的是一个jframe,而iframe中引入了js,在这个时候js不能运行,但是在火狐中是OK的,在IE6.0(开发中一般会使用IE6.0)不可以加载js,

这个问题需要你加载完成之后重新reload()一下即可

var myHtml='<iframe id="ifrm008" name="ifrm008" scrolling="auto" frameborder="0" width="100%"height="100%" src="/his/inpatient!detailUI.action{0}"></iframe>'; myHtml=myHtml.replace('{0}',params); // alert(myHtml); 测试打印输出 //new 窗体显示结果 this.detailWin=new top.Ext.Window({ title: "医院住院病人住院明细", layout:'fit', height: 600, width: 800, closeAction:'hide', plain: true, modal : true, listeners:{ afterrender:function(window){ //加载数据,刷新数据 //alert(top.frames['ifrm001'].location); top.frames['ifrm008'].location.reload(); //var mysrc=self.document.getElementById('ifrm001').src; //document.getElementById('ifrm001').src=mysrc; } }, html : myHtml });上面replace('{0}',params);是参数;

在以上代码中在IE和火狐中运行都是OK的,top.frames['ifrm008'].location.reload();用这个进行重新加载显示页面,extjs加载后js不会执行,所以需要使用reload重新加载窗体


转载于:https://www.cnblogs.com/J2EEPLUS/archive/2012/05/03/2487874.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值