I cannot get the jQuery to return a success even though the URL which it generates works. The code is as follows:
var baseURL = "http://api.rottentomatoes.com/api/public/v1.0.json";
var apiKey = "myAPIKEy";
$.ajax
({
type: "GET",
url: baseURL,
data: { apikey: apiKey },
success:function()
{
alert('here');
},
complete:function(data)
{
return data;
}
});
It does not hit success (I took out failed but it goes into failed). I am not sure why this is failing given I copy paste the generated URL and it works and spits back a response. Please let me know what other information I can provide. I am sorry for being a bit vague. Any help is greatly appreciated!!!
This will work, for cross domain