How to suppress “This page is accessing information not under its control”

后端 未结 5 1109
挽巷
挽巷 2020-12-06 09:27

I get this message when I am trying to access a web service from Jquery located in SAME the URL (but different directory).

I know it is IE security setting. The que

5条回答
  •  心在旅途
    2020-12-06 09:57

    I know this is caused because of 'Cross-domain data access' which I have enabled by

    jQuery.support.cors = true;
    

    In my Ajax call I had to specify jsonp as my data type to fix the issue.

    $.ajax({                    
               url: "xxx",                    
               dataType: "jsonp",
               ...
           });
    

提交回复
热议问题