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 ?

2
  • You have a CORS issue. Google for Cross Origin Resource Sharing for detailed explanations how to activate CORS or workarounds. Commented Aug 6, 2015 at 12:17
  • stackoverflow.com/questions/20035101/… Commented Aug 6, 2015 at 12:17

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.