请看图
每点击一次左边的树,刷新中间的iframe页面之后,先点击高级查询一次。
然后点击一次树 ,再点击一次高级查询,
然后点击一次树 ,再点击一次高级查询,
如此循环
菜单就成倍增加!
求高手解决啊。。
下面是我表格的代码
[code="java"]var grid = new Ext.grid.GridPanel({
renderTo: "test",
height:400,
title : '中国开源产品',
columns : [{
header : '编号',
dataIndex : 'id',
sortable : true,
renderer:function(value){return ""+value+""}
}, {
header : '名称',
dataIndex : 'uid',
sortable : true
}, {
header : '密码',
dataIndex : 'password',
sortable : true
}, {
header : '职业',
dataIndex : 'remark',
sortable : true
}, {
header : '性别',
dataIndex : 'sex',
sortable : true,
renderer : sexrender
}],
store : store,
loadMask : true,
viewConfig : {
forceFit : true
},
autoExpandColumn : 2,
bbar : new Ext.PagingToolbar({
pageSize : 5,
displayInfo : true,
store : store,
plugins:[new Ext.ux.plugins.PageComboResizer()],
beforePageText : '第',
afterPageText : '页 共{0}页',
emptyMsg : "没有记录",
displayMsg : '显示第 {0} - {1} 条记录,共 {2}条记录'
}),
tbar : [{
id : 'addButton',
text : '添加员工',
iconCls : 'addIconCss',
tooltip : '新增员工',
handler : onadd,
scope : this
}, '-', {
id : 'editButton',
text : '编辑信息',
iconCls : 'editIconCss',
tooltip : '编辑所选用户',
handler : onedit,
scope : this
}, '-', {
id : 'delButton',
text : '删除用户',
iconCls : 'deleteIconCss',
tooltip : '删除所选用户',
handler : ondel,
scope : this
}, '->', {
id : 'searchButton',
text : '高级查询',
iconCls : 'selectIconCss',
menu: new Ext.menu.Menu({
id: 'mainMenu1',
items: [{
text: '按费率名称查询',
iconCls: 'selectIconCss',
id: 'menu001'
},{
text: '按费率前缀查询',
iconCls: 'selectIconCss',
id: 'menu002'
}]
})
}]
});[/code]
我刚刚发现这个页面单独出来就没问题,内嵌框架就有问题。
我内嵌的事件是这样写的
[code="java"] m1_1.on("click", function() {
Ext.getCmp("center").load({
url : "right.php",
discardUrl : false,
nocache : true,
text : "Loading...",
timeout : 30,
scripts : true
});
});[/code]