jquery - DOMException: Failed to execute 'send' on 'XMLHttpRequest' on Chrome only -


i'm trying retrieve xml cross-domain server via ajax jquery's method , following error message appears on console:

domexception: failed execute 'send' on 'xmlhttprequest': failed load: 'http://foreign.domain/...'

the code brings error is:

var temp = $.ajax({     url : url,     async : false     datatype : "xml",     success : function(xml) {         // irrelevant case     },     error : function(xhr, textstatus, error) {         console.warn('an error occured while loading following url: "%s". error message: %s', url, error);     } }); 

the problem synchronous option specified by:

async: false, 

this seems not work in chrome because of specification of jquery's ajax method, says:

cross-domain requests , datatype: "jsonp" requests not support synchronous operation.

the strange of situation firefox , internet explorer seem ignore specification , both perform http request , return xml result.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -