javascript - Google Chrome - Failed GET ajax request -
i developing website loads html template page loads content xml. instance these called in document.ready function
$.ajax({ type : "get", url : "template.html", datatype : "html", success : function(html) { var ndoc = document.createelement('html'); ndoc.innerhtml = html; page = $('body', ndoc); $('body').html(page.html()); $.ajax({ type : "get", url : "xml/content.xml", datatype : "xml", success : function(xml) { page = $(xml).find('chisiamo').find('dialogue')[0]; setuppage(page); } }); } });
this works in firefox , safari. in chrome 'origin null not allowed access-control-allow-origin' when tries load template.html. how can solve problem? thank much.
try start google chrome arguments :
google-chrome --disable-web-security --allow-file-access-from-files
Comments
Post a Comment