Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.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
jquery ajax-async:false不';我不能在IPAD上工作_Jquery_Asp.net_Ajax_Ipad_Asynchronous - Fatal编程技术网

jquery ajax-async:false不';我不能在IPAD上工作

jquery ajax-async:false不';我不能在IPAD上工作,jquery,asp.net,ajax,ipad,asynchronous,Jquery,Asp.net,Ajax,Ipad,Asynchronous,我有以下代码: 阿贾克斯: } 使用: 当我在PC上运行此代码时,一切都正常。 当我在IPAD(safari/chrome)上运行此代码时,我在警报中得到“null”,然后我得到ajax调用中的警报: alert("res: " + ClientResponse.Success); alert("data:" + ClientResponse.Data); 所以我认为async:false在IPAD上不起作用。 这是真的吗? 有没

我有以下代码:

阿贾克斯:

}

使用:

当我在PC上运行此代码时,一切都正常。 当我在IPAD(safari/chrome)上运行此代码时,我在警报中得到“null”,然后我得到ajax调用中的警报:

                alert("res: " + ClientResponse.Success);
                alert("data:" + ClientResponse.Data);
所以我认为async:false在IPAD上不起作用。 这是真的吗?
有没有办法在IPAD上使用同步ajax调用

为什么需要同步呼叫?这几乎不是答案。我想将登录的用户名作为参数传递给jquery模板,因此我需要它是同步的,以确保它不为null。有其他解决方案吗?请按照在成功回调中呈现模板。
        var loggedInUser = GetLoggedInUserName();

        alert(loggedInUser);
                alert("res: " + ClientResponse.Success);
                alert("data:" + ClientResponse.Data);