I'm hoping someone out there can help me. I'm trying to do a very basic thing: use Jquery to get Json from a MVC3 controller. The controller returns the Json fine if I call the URI directly http://www.youtipit.org/api/GetTipitByUrl?url=http://utipi.it/t/1834 from a browser but I get an empty result (in Firebug) when I try to do the following:
$.getJSON( 'http://www.youtipit.org/API/GetTipitByUrl?url=http://www.youtipit.org/t/J1833', null,
function(data) {
if (data) {
alert('It Works!!');
alert(data);
}
});
In firebug i get a 200 code but the response is empty. I'm sure there is something simple I can do in my Javascript to get this to work but I'm new to this.
You are probably violating the same origin policy restriction. Unless your site is hosted on www.youtipit.org
you cannot send AJAX requests to it. There are two possible workarounds to this restriction:
WebClient
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With