jQuery Call to WebService returns “No Transport” error

前端 未结 8 1503
渐次进展
渐次进展 2020-11-22 15:19

I have the following web service;

    [WebMethod]
    public string HelloWorld()
    {
        return \"Hello World\";
    }

It\'s stock st

相关标签:
8条回答
  • I had the same error on a page, and I added these lines:

    <!--[if lte IE 9]>
    <script type='text/javascript' src='//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js'></script>
    <![endif]-->
    

    and it finally works for me ;) no more error in IE9.

    0 讨论(0)
  • 2020-11-22 16:03

    Add this: jQuery.support.cors = true;

    It enables cross-site scripting in jQuery (introduced after 1.4x, I believe).

    We were using a really old version of jQuery (1.3.2) and swapped it out for 1.6.1. Everything was working, except .ajax() calls. Adding the above line fixed the problem.

    0 讨论(0)
提交回复
热议问题