Reputation: 809
I'm trying to use jquery ajax to download xml from here: http://www.maciejko-sklep.pl/components/com_esklep/integracja.php?type=cenuj&pass=JH64HU7
or either html: link: http://www.maciejko-sklep.pl/components/com_esklep/integracja.php?type=html&pass=4FMIHGfd
and I get this error Origin null is not allowed by Access-Control-Allow-Origin.
I'm trying to figure this out, anyone knows how to fix this and somehow download content from either of those links. P.s. when i paste the link in url it works fine, but i cannot send ajax requests. THX
Upvotes: 1
Views: 2602
Reputation: 809
here is how I solved this issue
http://www.cypressnorth.com/blog/programming/cross-domain-ajax-request-with-xml-response-for-iefirefoxchrome-safari-jquery/
Upvotes: 0
Reputation: 2149
Add this to the top of your php file:
<?php header('Access-Control-Allow-Origin: *'); ?>
It solved my issue with access-control-allow-origin
Upvotes: 0
Reputation: 25776
Cross domain ajax requests are restricted by the browser, unless the server explicitly has cors enabled.
Upvotes: 1