Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Can';无法从服务器获取答案。ExtJs_Javascript_Extjs - Fatal编程技术网

Javascript Can';无法从服务器获取答案。ExtJs

Javascript Can';无法从服务器获取答案。ExtJs,javascript,extjs,Javascript,Extjs,我在提交ExtJs表单时遇到问题。我无法获得成功功能 我有: formp = new Ext.FormPanel({ fileUpload: true, width: 350, autoHeight: true, bodyStyle: 'padding: 10px 10px 10px 10px;', labelWidth: 70, defaults: { anchor: '95%', allowBlank: false, msgTarget: 'side' }, it

我在提交ExtJs表单时遇到问题。我无法获得
成功
功能

我有:

formp = new Ext.FormPanel({
 fileUpload: true,
 width: 350,
 autoHeight: true,
 bodyStyle: 'padding: 10px 10px 10px 10px;',
 labelWidth: 70,
 defaults: {
  anchor: '95%',
  allowBlank: false,
  msgTarget: 'side'
 },
 items:[{
xtype: 'fileuploadfield',
id: 'filedata',
emptyText: 'Выберите файл для загрузки...',
    fieldLabel: 'Имя файла',
buttonText: 'Обзор'
 }],
 buttons: [{
text: 'Загрузить',
handler: function(){
formp.getForm().submit({
  url: url_servlet+'doUpload.jsp',
  success: function(formp, o) {
      alert(o.responseText);    
      }
                                             })
                                            }
 }]
})
在doUpload.jsp中,我有
out.println(“1111”)
在fireBug中,我看到
doUpload.jsp
POST
1111
,但没有警报。怎么了?


你能给我们完整的回复吗?out.println(“1111”);就这些。或者你问一些其他的问题?当我从另一个jsp获得答案时,我使用这个方法,一切都很好。我尝试发送这个
out.println({success:true,file:'11111'})它的工作,但是如何在警报中获得
11111
//Respone object
out.println("{success:true, file:'11111'}");

//Submitting the form. The second parameter in the success callback is
//your response object. You can access it properties as shown below.
formp.getForm().submit({
  url: url_servlet+'doUpload.jsp',
  success: function(formp, o) {
      alert(o.result.file);    
  }
});