I am working to dynamically create a UI from XML using jQuery. My jQuery is working in Firefox but in Chrome it's not working. It gives me this console error:
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
The following is my jQuery code which working on Firefox but not working on Google chrome:
$.ajax({
url: 'file:///home/satendra/dndExamples/avisDnD/file.xml',
success: function(xml) {
$(xml).find('Tab').each(function() {
var id = $(this).attr('URL');
var tab = $(this).attr('TabName');
$("ul").append("<li><a href="+ id +">"+ tab +"</li>");
});
}
});