I'm trying to retrieve an XML from a cross-domain server via the ajax jQuery's method and the following error message appears on the console:
DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load: 'http://foreign.domain/...'
The code that brings this error is:
var temp = $.ajax({
url : url,
async : false
dataType : "xml",
success : function(xml) {
// irrelevant for the case
},
error : function(xhr, textStatus, error) {
console.warn('An error occured while loading the following URL: "%s". Error message: %s', url, error);
}
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…