JQuery external Ajax call not working in IE

后端 未结 7 2107
梦毁少年i
梦毁少年i 2020-12-21 21:37

I have an ajax script that sends some data to an external URL. The external URL is hosted on the same server, however the domain is different than the source of the ajax cal

7条回答
  •  孤城傲影
    2020-12-21 22:01

    I dont think it should work on Chrome or Firefox, unless you testing on localhost or something like that, this would be against the crossdomain policy.

    What you need is to proxy it inside the same domain, use php to connect to the destination you need and call the url from the same domain.

    save_cross_domain.php -> connect through server to the desired url

    then ajax calls save_cross_domain.php

提交回复
热议问题