Whenever I make a JSONP call through jquery to any page that I have configured (locally or on my server), all I get is a silent call. Firebug reports 200 OK, and the response looks fine. I set the warning windows to a popup with success or not appearing. It doesn't seem to matter which url I use, nothing pops up.
BUT, if I use the twitter json page, then a success warning window appears, so obviously something is wrong with my answer, but I don't know what.
As an experiment, I copied the twitter json response and uploaded it to my booroo.com domain. It should be identical, but still nothing. I set the headers on the answer page to "application / json" and utf-8, but still nothing.
Please help, I spent all day on this now, and I do not know what else to try.
$.ajax({ dataType: 'jsonp', // url: 'http://booroo.com/json.asp?callback=?', url: 'http://twitter.com/users/usejquery.json?callback=?', success: function () { alert("Success"); }, error: function(x,y,z) { alert("error"+x.responseText); } });
The json.asp response file contains the following classic ASP headers, and then the json response copied from twitter (I also tried others without success).
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Response.Expires = 0 Response.Expiresabsolute = Now() - 1 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "no-cache" response.ContentType="application/json" Response.CodePage = 65001 Response.CharSet = "UTF-8" %>({"test_param":12345});