0

I need to parse this JSON link

http ://www.mse.mk/FreeMseFeeds/service/FreeMSEFeeds.svc/ticker/JSON/9538ac69-2c99-45ba-bbd4-90931ca0cc7d

to be same like on this page:

http ://www.mse.mk/en/

image: http: //tinypic.com/r/1zlyhwo/8

I've tried like this:

 $.getJSON("http://www.mse.mk/FreeMseFeeds/service/FreeMSEFeeds.svc/ticker/JSON/9538ac69-2c99-45ba-bbd4-90931ca0cc7d",function(data){
   alert(data[0].name);
});

I got this error:

XMLHttpRequest cannot load http:// www.mse.mk/FreeMseFeeds/service/FreeMSEFeeds.svc/ticker/JSON/9538ac69-2c99-45ba-bbd4-90931ca0cc7d. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http: //kristijanz.com' is therefore not allowed access.

Any help ?

ebilgin
  • 1,242
  • 10
  • 19
user3181034
  • 179
  • 1
  • 1
  • 11
  • You have a CORS issue. Google for Cross Origin Resource Sharing for detailed explanations how to activate CORS or workarounds. – Shilly Aug 06 '15 at 12:17
  • http://stackoverflow.com/questions/20035101/no-access-control-allow-origin-header-is-present-on-the-requested-resource – ebilgin Aug 06 '15 at 12:17

1 Answers1

1

Looks like a CORS issue - your application calling www.mse.mk/FreeMseFeeds/service/FreeMSEFeeds.svc/ticker/JSON/9538ac69-2c99-45ba-bbd4-90931ca0cc7d is not running in the same domain.

If you control the service, you can implement CORS to allow other domain origins.

If you do not, you cannot call this service from your domain.

CORS - https://en.wikipedia.org/wiki/Cross-origin_resource_sharing

Starscream1984
  • 3,072
  • 1
  • 19
  • 27