xtype: 'combo',
mode: 'local',
value: '1',
allowBlank: false,
triggerAction: 'all',
forceSelection: true,
editable: false,
fieldLabel: 'Is This Your Territory?',
name: 'is_territory',
hiddenName: 'is_territory',
displayField: 'name',
valueField: 'id',
width: 230,
store: yesnoStore,这是我的code.why,在ie中没有显示。
发布于 2013-03-04 19:38:24
我检查过你的代码,它在IE上运行。你在定义你的yesnoStore商店吗?或者可能只是代码末尾的额外coma:yesnoStore,,删除它。
在你的脚本中包含一个存储,这个组合就能正常工作:
var yesnoStore = new Ext.data.ArrayStore({
fields: ['id', 'name'],
data : [['0','option_1'],['1','option_2'],['2','option_3'],['3','option_4']]
});这个例子在IE上工作,也许问题出在你的商店里。
{
xtype: 'combo',
mode: 'local',
value:'1',
allowBlank: false,
triggerAction: 'all',
forceSelection: true,
editable: false,
fieldLabel: 'Is This Your Territory?',
name: 'is_territory',
hiddenName: 'is_territory',
displayField: 'name',
valueField: 'id',
width: 230,
store: yesnoStore
}发布于 2013-03-05 20:37:59
如果您粘贴了完整的配置,错误可能来自额外的逗号:
{
xtype: 'combo',
mode: 'local',
value: '1',
allowBlank: false,
triggerAction: 'all',
forceSelection: true,
editable: false,
fieldLabel: 'Is This Your Territory?',
name: 'is_territory',
hiddenName: 'is_territory',
displayField: 'name',
valueField: 'id',
width: 230,
store: yesnoStore, // < remove this comma
}发布于 2014-10-30 02:44:17
即使语法正确,这也不会起作用。IE9的ExtJS 3.3.1 (已确认)及更低版本(假设)有错误。IE在页面加载时将组合框的高度设置为0。
我尝试了以下更改,但没有成功:
在config
到目前为止,我找到的唯一解决方案是:
升级到ExtJS 3.4.0或以上版本。这将修复这个bug和其他许多与IE9相关的bug。
如果您转到sencha示例,并使用IE9查看3.3.1的组合框的示例,它将无法工作。如果你在3.4.0中检查组合框的示例,它可以与IE9一起工作。
不幸的是,对我来说,这不是一个选择,所以我将继续寻找另一个不涉及升级的解决方案。
希望这能有所帮助。
https://stackoverflow.com/questions/15200243
复制相似问题