extjs 上传 ext-all.js语法错误 求大神帮忙检查一下那里有问题,感激不尽
varformUpload=newExt.form.FormPanel({baseCls:'x-plain',name:'aaa',labelWidth:100,file...
var formUpload = new Ext.form.FormPanel({
baseCls: 'x-plain',
name:'aaa',
labelWidth: 100,
fileUpload:true,
defaultType: 'textfield',
items: [{
xtype: 'textfield',
fieldLabel: '需要上传的文件',
name: 'upload',
inputType: 'file',
allowBlank: false,
blankText: '请上传文件',
anchor: '90%'
}]
});
var win=new Ext.Window({
title:'新增报表有效区间',
closable:true,
//modal:true,//阻止其他操作
width: 400,
height:150,
minWidth: 300,
minHeight: 100,
layout: 'fit',
plain:true,
bodyStyle:'padding:25px;',
buttonAlign:'center',
items: formUpload,
buttons: [{
text: '上 传',
handler: function() {
//win.hide();
if(formUpload.form.isValid()){
//submitForm('edit',t.getSelections()[0].data.reportcode);
formUpload.form.submit({
url:"./PDFSplitDefSave.jsp?ReportCode="+t.getSelections()[0].data.reportcode+"&operate=edit",
success: function(){
alert('aa');
},
failure: function() {
alert('bb');
}
});
};
alert('a');
}
},{
text: '取 消',
handler:function(){win.hide();}
}]
});
win.show();
话说主要报错是这部分代码:
formUpload.form.submit({
url:"./PDFSplitDefSave.jsp?ReportCode="+t.getSelections()[0].data.reportcode+"&operate=edit",
success: function(){
alert('aa');
},
failure: function() {
alert('bb');
}
});
有进不到回调函数里面去,就报了ext-all.js语法错误 展开
baseCls: 'x-plain',
name:'aaa',
labelWidth: 100,
fileUpload:true,
defaultType: 'textfield',
items: [{
xtype: 'textfield',
fieldLabel: '需要上传的文件',
name: 'upload',
inputType: 'file',
allowBlank: false,
blankText: '请上传文件',
anchor: '90%'
}]
});
var win=new Ext.Window({
title:'新增报表有效区间',
closable:true,
//modal:true,//阻止其他操作
width: 400,
height:150,
minWidth: 300,
minHeight: 100,
layout: 'fit',
plain:true,
bodyStyle:'padding:25px;',
buttonAlign:'center',
items: formUpload,
buttons: [{
text: '上 传',
handler: function() {
//win.hide();
if(formUpload.form.isValid()){
//submitForm('edit',t.getSelections()[0].data.reportcode);
formUpload.form.submit({
url:"./PDFSplitDefSave.jsp?ReportCode="+t.getSelections()[0].data.reportcode+"&operate=edit",
success: function(){
alert('aa');
},
failure: function() {
alert('bb');
}
});
};
alert('a');
}
},{
text: '取 消',
handler:function(){win.hide();}
}]
});
win.show();
话说主要报错是这部分代码:
formUpload.form.submit({
url:"./PDFSplitDefSave.jsp?ReportCode="+t.getSelections()[0].data.reportcode+"&operate=edit",
success: function(){
alert('aa');
},
failure: function() {
alert('bb');
}
});
有进不到回调函数里面去,就报了ext-all.js语法错误 展开
1个回答
2013-05-27
展开全部
话说肉眼无法检测语法错误在哪里,
你可以直接把firebug控制台的错误贴出来,起码知道错误大致位置和上下文、才好分析。
--根据问题补充猜测:t.getSelections()[0].data.reportcode报了错误,直接贴错误堆栈出来吧
你可以直接把firebug控制台的错误贴出来,起码知道错误大致位置和上下文、才好分析。
--根据问题补充猜测:t.getSelections()[0].data.reportcode报了错误,直接贴错误堆栈出来吧
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询