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
Google chrome ExtJS 4,Chrome中的直接文件上载:Uncaught InvalidStateError:试图使用不可用或不再可用的对象。_Google Chrome_Extjs_Upload_Submit_Rpc - Fatal编程技术网

Google chrome ExtJS 4,Chrome中的直接文件上载:Uncaught InvalidStateError:试图使用不可用或不再可用的对象。

Google chrome ExtJS 4,Chrome中的直接文件上载:Uncaught InvalidStateError:试图使用不可用或不再可用的对象。,google-chrome,extjs,upload,submit,rpc,Google Chrome,Extjs,Upload,Submit,Rpc,我尝试在“googlechrome”中上传一个文件,其中包含“extjs4”和直接表单提交 我在chrome中尝试的每一种方式都会出现错误: 未捕获的InvalidStateError:试图使用不可用或不再可用的对象 在Firefox中,它没有例外 我在不同的论坛上搜索了allready,但是没有一个失败的问题,请告诉我可以使用什么来完成我的任务 有人能帮我吗 Ext.define('MyApp.view.DirectUpload', { extend: 'Ext.form.Panel', i

我尝试在“googlechrome”中上传一个文件,其中包含“extjs4”和直接表单提交

我在chrome中尝试的每一种方式都会出现错误:

未捕获的InvalidStateError:试图使用不可用或不再可用的对象

在Firefox中,它没有例外

我在不同的论坛上搜索了allready,但是没有一个失败的问题,请告诉我可以使用什么来完成我的任务

有人能帮我吗

Ext.define('MyApp.view.DirectUpload', {
extend: 'Ext.form.Panel',

itemId: 'DirectUpload',
title: 'Direct Upload',

initComponent: function() {
    var me = this;

    me.initialConfig = Ext.apply({
        paramOrder: [
            'name',
            'file'
        ]
    }, me.initialConfig);

    Ext.applyIf(me, {
        paramOrder: [
            'name',
            'file'
        ],
        items: [
            {
                xtype: 'textfield',
                itemId: 'name',
                fieldLabel: 'Label',
                name: 'name'
            },
            {
                xtype: 'filefield',
                id: 'file',
                itemId: 'file',
                fieldLabel: 'Label',
                name: 'file'
            },
            {
                xtype: 'button',
                handler: function(button, event) {
                    this.up('form').getForm().submit({
                        scope: this,
                        success: function(form, action)
                        {
                            console.log(action);
                        },
                        failure: function(form, action)
                        {
                            console.log(action);
                        }

                    });
                },
                text: 'MyButton'
            }
        ]
    });

    me.processDirectUploadTest(me);
    me.callParent(arguments);
},

processDirectUploadTest: function(config) {
    config.api = {submit: 'RPC.fileupload.filterUploads'};
    return config;
}

}))

你用的是什么ExtJS版本?我用的是ExtJS4.2.1。和谷歌Chrome版本32.0.1700.76 m,仅供参考。好的,现在我在Firefox中得到错误“TypeError:循环对象值”:(