Hi, I’m new to html5 and jquery development. I have a problem with loading XML using jQuery apparently only on Chrome. My site is:
As you can see that the Portfolio Section is working fine with all browsers except Chrome. When I open Chrome JavaScript console, I see this error:
event_bindings: 232
Failed to load resource: the server responded with a status of 403 (Forbidden) …
My code is:
$(document).ready(function()
{
$.ajax
({
type: "GET",
url: "../Assets/protfolio.xml",
dataType: "XML",
success: xmlParser
});
});
xmlParser.js is the jQuery script that loads the XML
Any help will be appreciated.
You set the
sandboxattribute on the iframe, causing all restrictions to apply except the ones you set. You didn’t setallow-same-origin, so the origin was treated unique and you were experiencing a cross domain error.You can add
allow-same-originto the attribute value to bring it back to its normal state with respect to the origin.See the specification: