[code="java"][/code]我现在给公司做一个项目,是定义一个按钮列,点击按钮后调用一个函数,给后台传一个(autoId)的参数,我把所有的变量都在Ext.onReady方法外面定义了,现在报的错是:“对象不支持此属性或方法”找了半天也没找到原因,晕死了。请大虾,帮帮我,很急啊!(我上传了源代码)
一下是部分代码:
code="ruby"]sm = new Ext.grid.CheckboxSelectionModel();
cm=new Ext.grid.ColumnModel([sm,{
header:"当值日期",dataIndex:"dutyDate",width:200,align:"center"},
{header:"区域",dataIndex:"region",width:200,align:"center"},
{header:"班次",dataIndx:"dutyno",width:200,align:"center"},
{header:"当值区域",dataIndex:"standRegion",width:200,align:"center"},
{header:"维修工",dataIndex:"worker",width:150,align:"cneter"},
{header:'删除',
width: 80,
align: 'center',
dataIndex:'autoId',
renderer: function cancel(value){
cancelButton='
'; | 删除 | ';
return cancelButton;
}
}
]);
cancel=function(value){
Ext.Msg.confirm('提示','是否确定取消该计划?',function(btn){
if(btn!='yes'){
return;
}
Ext.Ajax.request({
url:'',
params:{planId:value},
callback:function(o,s,r){
if(r.responseText=='success'){
Ext.Msg.alert('提示',' 取消成功! ');
//store.load({params:{autoId:Request['code']}});
}else{
Ext.Msg.alert('提示',' '+r.responseText+' ');
}
}
});
});
};
[/code]