I am trying to run jsonp callback using jquery inside a greasemonkey script. Here is my jquery:
$.ajax({
url: "http://mydomain.com/MyWebService?callback=?",
data: { authkey: "temphash" },
type: "get",
dataType: "json",
cache: false,
success: function(data) {
console.log(data);
}
});
in my webservice (asp.net) I am returning a response with a content type application/javascript. The answer that the server actually sends is:
jsonp1276109314602({"message":"I'm getting tired of this not working"})
The method name is jsonp1276109314602randomly generated by jquery and I grab it withRequest.QueryString["callback"]
However, my success function is never called, and the firebug console gives me an error message jsonp1276109314602 is not defined.
What am I doing wrong?
greasemonkey script Craigslist. , , , - , jquery, , , . , script firebug Craigslist, , greasemonkey script.