码迷,mamicode.com
首页 > Web开发 > 详细

Extjs ajax form 提交

时间:2016-03-02 10:51:02      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:

1.form 提交

 form.form.submit({
                    url: "/HandlerExcelToDB/UploadFile.ashx",
                    params: {},
                    success: function (formUpload, action) {
                        var PicName = action.result.FileName;

                        Ext.MessageBox.alert("提示", "上传成功!");
                        Ext.MessageBox.hide();
                        winUpload_Excel.hide();
                    },
                    failure: function (formUpload, action) {
                        Ext.MessageBox.alert("提示", "上传失败!");
                    }
                });

2.ajax 提交

  Ext.Ajax.request({
                        url: ‘/HandlerExcelToDB/PKUCarPart_ExcelToDB.ashx?Func=PKUCarPartExcelToDB‘,
                        method: ‘POST‘,
                        params: {
                            ModelId: ModelId,
                            CPTrademarkId: CPTrademarkId,
                            ShopId: ShopId,
                            FileExcel:FileExcel,
                            ProductMainPic: ProductMainPic,
                            JsonDatarCarPKU: Ext.encode(arrayCarPKU),
                        },
                        success: function (response) {
                            Ext.MessageBox.alert(‘提示‘, ‘保存成功!‘);
                            store.load({ params: { start: start, limit: limit } });
                            Ext.MessageBox.hide();
                            form.getForm().reset();
                            win.hide();
                        },
                        failure: function () {
                            Ext.MessageBox.alert("提示", "保存失败!");
                        }
                    });

 

Extjs ajax form 提交

标签:

原文地址:http://www.cnblogs.com/foreverfendou/p/5233900.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!