关于extjs中一个js应用另外一个js文件时出现的问题
时间:2011-12-12
来源:互联网
主页面相关的a.js代码中有一个button,在button的单击事件中,我想调用另外一个b.js文件,将一个window窗口显示出来,然后我将b.js中Ext.onReady(function(){....})直接修改为function b(){....},这样在单击事件中直接调用b(),确实是可以显示了.但是b.js中的一些元素在第一次的时候还能正常显示,但是下一次点击按钮弹出框的时候就无法正常显示了....
var byWeek = {
id:'week',
xtype: 'fieldset',
title: '每周几',
hidden : true,
height:100,
items: [
{
xtype: 'radiogroup',
id:'weekValue',
items: [
{boxLabel: '周一', name: 'week-auto',inputValue:'周一'},
{boxLabel: '周二', name: 'week-auto',inputValue:'周二'},
{boxLabel: '周三', name: 'week-auto',inputValue:'周三'},
{boxLabel: '周四', name: 'week-auto',inputValue:'周四'},
{boxLabel: '周五', name: 'week-auto',inputValue:'周五'},
{boxLabel: '周六', name: 'week-auto',inputValue:'周六'},
{boxLabel: '周日', name: 'week-auto',inputValue:'周日'}
]
}
]
};
var page2Panel = new Ext.FormPanel({
title :'调度时间规则设定',
frame: true,
id:'p2',
labelWidth: 110,
width: 600,
bodyStyle: 'padding:0 10px 0;',
layout:'fit',
autoHeight:true,
items: [byWeek ]
});
var wizardWindow = new Ext.Window({
title : '调度规则初始化向导',
width: 600,
height: 400,
border : true,
plain : true,
layout : 'fit',
closeAction:'hide',
x:300,
y:200,
items : [ wizardPanel],
buttons:[
{
text: upText,
id :'last',
handler:changePage
},
{
text: nextText,
id:'next',
handler:changePage
}
]
});
wizardWindow.show();[align=center][/align]
再把这个放到一个window里面,显示的就是这个window,但是byweek在第二次加载的时候无法正常显示了...
var byWeek = {
id:'week',
xtype: 'fieldset',
title: '每周几',
hidden : true,
height:100,
items: [
{
xtype: 'radiogroup',
id:'weekValue',
items: [
{boxLabel: '周一', name: 'week-auto',inputValue:'周一'},
{boxLabel: '周二', name: 'week-auto',inputValue:'周二'},
{boxLabel: '周三', name: 'week-auto',inputValue:'周三'},
{boxLabel: '周四', name: 'week-auto',inputValue:'周四'},
{boxLabel: '周五', name: 'week-auto',inputValue:'周五'},
{boxLabel: '周六', name: 'week-auto',inputValue:'周六'},
{boxLabel: '周日', name: 'week-auto',inputValue:'周日'}
]
}
]
};
var page2Panel = new Ext.FormPanel({
title :'调度时间规则设定',
frame: true,
id:'p2',
labelWidth: 110,
width: 600,
bodyStyle: 'padding:0 10px 0;',
layout:'fit',
autoHeight:true,
items: [byWeek ]
});
var wizardWindow = new Ext.Window({
title : '调度规则初始化向导',
width: 600,
height: 400,
border : true,
plain : true,
layout : 'fit',
closeAction:'hide',
x:300,
y:200,
items : [ wizardPanel],
buttons:[
{
text: upText,
id :'last',
handler:changePage
},
{
text: nextText,
id:'next',
handler:changePage
}
]
});
wizardWindow.show();[align=center][/align]
再把这个放到一个window里面,显示的就是这个window,但是byweek在第二次加载的时候无法正常显示了...
作者: tobelchl 发布时间: 2011-12-12
有没有高手帮小弟指导下,还是我描述的问题太晦涩了?
作者: tobelchl 发布时间: 2011-12-13
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28