I created an asp.net aspx page. My aspx html side is empty and the codebehind is:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.ContentType = "application/x-javascript"
Response.Write("jsonFlickrFeed({""items"": [{""tags"": ""portrait""}] })")
Response.End
End Sub
My json query looks like this:
$.getJSON("MyUrlOnAnotherDomain.com?jsoncallback=?", jsonFlickrFeed);
function jsonFlickrFeed(data)
{
debugger;
}
Now everytime I try to run this I get the error: jsonFlickrFeed is undefined. When I replace the url to flicker, then it works fine. I also tried to set the contentType to JSON, but that does not change anything either. Whats wrong here?