zoukankan      html  css  js  c++  java
  • ExtJS Ext.Ajax.request最好设为同步

    ExtJS 中Ext.Ajax.request最好设为同步,即async: false,因为如果Ajax后面需要用到Ajax更新的数据的话,设置同步,后面才能用到最新的数据。

    function GetPatientOrder() {
        Ext.Ajax.request({
            url: '/CommonAshx/Order.ashx',
            method: 'get',
            async: false,
            params: {
                gurd: "GetOrder",
                patientCardNo: Ext.getCmp("CardNo").value
            },
            success: function (response, options) {
                var responseJson = Ext.decode(response.responseText);
                docAdGrid.store.loadData(responseJson.rows);
            },
            failure: function () {
                Ext.Msg.alert("错误", "与后台联系的时候出了问题。");
            }
        });
    }
  • 相关阅读:
    5月16日 AJAX
    5月13日 Jquery基础
    5月13日 PDO封装
    会话控制练习
    文件上传
    会话控制
    注册审核
    练习
    三级联动
    AJAX之XML
  • 原文地址:https://www.cnblogs.com/NaughtyBaby/p/4251908.html
Copyright © 2011-2022 走看看