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
Post a Comment