-1

Trying to get add from mobicow.On loading this URL got an xml response .But from my website shows this error...

XMLHttpRequest cannot load http://cdn.mobicow.com/feed/get/pub/4792/sub/{id}/ip/184.72.184.19/ua/Mozil…537.36/ref/http%3A%2F%2Fwww.comikka.com%2F/lang/en-US/kw/0/c/2/compliant/0. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

my code var url='http://cdn.mobicow.com/feed/get/pub/4792/sub/3352/ip/184.72.184.19/ua/Mozilla%2F5.0%20(Windows%20NT%206.1%3B%20WOW64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F36.0.1985.143%20Safari%2F537.36/ref/http%3A%2F%2Fwww.comikka.com%2F/lang/en-US/kw/0/c/2/compliant/0'

 $.get(url, function( data ) {
     alert( 'Successful cross-domain AJAX request.' );
    });
  • What are you trying to do and how? Please provide some context. – ljacqu Aug 20 '14 at 08:37
  • Cross-domain problem -.-" Server origin and client are in the same host. You have to disable web security in your browser. http://stackoverflow.com/questions/17711924/disable-cross-domain-web-security-in-firefox – Héctor Aug 20 '14 at 08:43

1 Answers1

1

This is a common problem when you are using AJAX.

If you page is loaded by going to

http://www.domain1.com/samplefirstpage.php

And you ajax wants to load something from

http://www.antherdoomain.com/anotherpage.php

You will get this error

If you keep that in mind, you should be able to hunt down the reason why your code is giving you this error

Cheers

Ayo Makanjuola
  • 608
  • 7
  • 14