jquery ajax在EXTNET中不能异步工作

时间:2015-04-28 20:08:46

标签: javascript jquery ajax extjs asynchronous

我有一个问题,我的ajax方法不能异步工作。有人可以帮我吗? 方法a()返回单个记录,而方法b()返回500条记录。

<script>
function a() {
            var param = "Some value";
            $.ajax
            ({
                url: "WebForm1.aspx/getDetail",
                data: "{eUnidad:'" + param + "'}",
                type: "POST",
                async: true,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (respuesta) {
                    alert('teminado');
                },
                error: function (xhr, status) {
                    alert('Disculpe, existió un problema');
                }
            });
        }

function b() {
            var param = "someValue";
            $.ajax
            ({
                url: "WebForm1.aspx/getAllDetails",
                data: "{jsons:'" + param + "'}",
                type: "POST",
                async: true,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (respuesta) {
                    alert('teminado');
                },
                error: function (xhr, status) {
                    alert('Disculpe, existió un problema');
                }
            });
</script>

0 个答案:

没有答案