相关疑难解决方法(0)

使用extjs不会在文件上载中调用成功处理程序

我有一个J2EE Web应用程序,其中包含一个表单,我将文件上传到服务器上的某个位置.在上传期间,向用户显示waitMsg,一旦上传完成,msgBox指示相同,就会消失.成功案例的代码也在js文件中提供.但是上传工作正常,但即使在服务器上传完成后,waitMsg仍会继续.
给出了js代码:

Ext.onReady(function(){

    Ext.QuickTips.init();

    var msg = function(title, msg){
        Ext.Msg.show({
            title: title,
            msg: msg,
            minWidth: 200,
            modal: true,
            icon: Ext.Msg.INFO,
            buttons: Ext.Msg.OK
        });
    };

    var fp = new Ext.FormPanel({
        renderTo: 'fi-form',
        fileUpload: true,
        width: 500,
        frame: true,
        title: 'Upload XML Config File ',
        autoHeight: true,
        bodyStyle: 'padding: 10px 10px 0 10px;',
        labelWidth: 50,
        defaults: {
            anchor: '95%',
            allowBlank: false,
            msgTarget: 'side'
        },
        items: [{
            xtype: 'fileuploadfield',
            id: 'form-file',
            emptyText: 'Select the xml File to upload',
            fieldLabel: 'File',
            name: 'file', …
Run Code Online (Sandbox Code Playgroud)

extjs

4
推荐指数
1
解决办法
5100
查看次数

ExtJS 4 Form.submit()没有成功:回答是真的

我有一个表单,提交方式如下:

form.submit({
                url: '/postme',
                waitMsg: 'Loading...',
                method: 'POST',
                success: function (form, action) {
                   console.log(action.response.responseText);                                   
                }
            });
Run Code Online (Sandbox Code Playgroud)

但!回答的主要问题是我没有财产success: true,无法设法添加它.有没有办法callbackExt.Ajax.request中创建类似参数的东西 而不是success?或者也许有一种方法告诉form.submit()它必须检测其他responsece参数的成功?

BTW:a不能使用Ext.Ajax.request,因为我必须从表单传递多部分数据(文件上传).

提前致谢.

javascript extjs extjs4

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

extjs ×2

extjs4 ×1

javascript ×1