There are 2 methods to solve this situation
1. Using jsonp in ajax.
var wind = window.open(“”, “popupWindow”, “width=600,height=600,scrollbars=yes”);
Jsonp is the only type in ajax that allow cross domain request.But the problem is that the response data type must be jsonp as well.
CORS also use XMLHttpRequest to send request.
The problem is that if we want to use CORS we need to set the sever side.
However ,sometime we can not set the config file on the server side.
There is another way to do it .link :