依据父页面的高度对Iframe中的表格的高度的调整
来源:互联网 发布:电脑拨号打电话软件 编辑:程序博客网 时间:2024/06/07 07:40
Ext.namespace('cms.SysConfig');
//缓冲Iframe中的Grid对象
var gSubIframeGrid=null;
cms.SysConfig.sysConfigfnPanel = function(config) {
//如果在继承时在override参数中定义了constructor方法,则子类不会继承父类在构造函数中定义的属性,
//但是可以继承在prototype中定义的属性,
//在这种情况下只有在constructor中调用父类的构造函数myClass.superclass.constructor.call(this,……);
//才会继承父类在构造函数中定义的对象。
cms.SysConfig.sysConfigfnPanel.superclass.constructor.call(this, config);
};
Ext.extend(cms.SysConfig.sysConfigfnPanel, //子类名
Ext.ux.BaseControl,//父类名
{ //子类的创建函数,存在就Override,不存在就create
typeGrid:undefined,
allPanel:undefined,
code:undefined,
getControl:function(){
this.htmlPanel =new Ext.Panel({
code:this.code+"",
id:this.code,
iconCls: 'tabs',
html:"<iframe id='sysParamiframe' scrolling='auto' frameborder='0'width='100%' height='100%' src='/modules/SysConfig/sysinfo/sysConfig.jsp'></iframe>",
listeners : {
resize : function(comp,adjWidth, adjHeight, rawWidth, rawHeight) {
}.createDelegate(this)
}
});
this.allPanel =new Ext.Panel({
code:this.code+"",
title:"->配置系统参数",
region:"center",
layout:"fit",
items:[this.htmlPanel],
listeners : {
afterLayout : function() {//布局完成后调整表格的高度
var task = { //Ext的定时器,每隔1秒检测一次。
run : function() {
//获取Ifframe中的Div对象
// var sysConfigGrid=Ext.get("sysParamiframe").dom.contentWindow.document.getElementById("sysConfigGridId");
//在Iframe中访问父对象格式如下:self.parent.Ext.
//在Iframe中存在以下代码:
//将Ext对象赋值给Iframe的父页面的变量 zhx
//self.parent.gSubIframeGrid=sysConfigGrid;
if (gSubIframeGrid){//布局完成了,但是Iframe还没有加载完,就不会执行的,定时检测,直到ifframe加载完成或异常发生退出定时器
try{
gSubIframeGrid.setHeight(this.htmlPanel.getHeight());
gSubIframeGrid.doLayout();
}catch(ex){
alert(ex);
}
finally{
Ext.TaskMgr.stop(task);//加载完成,关闭定时器
}
}
}.createDelegate(this),
interval : 1000
}
Ext.TaskMgr.start(task);//启动定时器
}.createDelegate(this)
}
});
return this.allPanel;
}
});
- 依据父页面的高度对Iframe中的表格的高度的调整
- 表格自适应iframe的高度.
- 利用iframe中的页面来改变iframe的高度
- 根据窗体的高度改变调整iframe的高度
- 根据内容调整iframe的高度
- 根据内容调整iframe的高度
- iframe 的高度根据内容自动调整
- 根据内容调整iframe的高度
- 自动调整框架iframe的高度
- iframe中页面高度不能达到iframe的高度
- 零高度 iframe对页面布局的影响
- 表格的高度或者宽带无法调整
- 设置当前页面中的一个IFrame的自适应高度
- jquery 子页面控制父页面IFRAME的高度
- 获取当前页面高度,赋值给父页面的iframe
- 让外层iframe的高度自适应加载页面高度
- iframe 高度自适应,并且子页面的高度不断变化
- js获取页面内iframe的高度
- Layout_gravity和gravity的区别!
- PostGreSql copy database
- 许我在记忆里想你
- Qt:多线程编程
- 二叉树的遍历1
- 依据父页面的高度对Iframe中的表格的高度的调整
- oracle的sqlnet.ora,tnsnames.ora,listener.ora三个配置文件
- Eas waf2框架中利用POI导入excel
- dom4j通过xpath查询xml
- ActionBar详解
- 获取系统特殊文件夹的路径
- android ExpandableListView可扩展列表
- argc, argv简单使用
- NGUI学习笔记(摘)