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

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -

delphi - How to convert bitmaps to video? -