Hello all
I am trying to make a get http request using jquery getJSON function. I have implemented it like this...
<script type="text/javascript">
$(function(){
$("#query").keyup(function(event) {
keyword = $("#query").val();
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?", showdata );
});
});
function showdata(data, status) {
alert(data + ":" + status);
}
</script>
This always returns null. I have checked the HTTP Headers, they are null as well. But if I directly use the URL, it displays JSON in the browser window.
What am I doing wrong?
Some suggested I should use JSONP, but in the URL I will actually using, there is some sensitive information which I don't want to reveal, so I want to stick with getJSON.
Regards