A type, sorry, everything works fine without javascript warnings or errors, can seem to get any function to be called after a request which return 400.
Just fixed the server so that it returns correct MIME-type "application/javascript" instead of just text for errors, this wasn't the problem though... $.ajax({ url: "http://localhost:9998/search/" + searchVal + "? callback=?", type: "GET", dataType: "json", success: function() { alert("success"); }, error: function() { alert("error"); }, complete: function() { alert("complete"); } }); Some Firebug info after a call: =========== GET http://localhost:9998/search/jonas?callback=jsonp1263842210822 400 Bad Request localhost:9998 Response Headers: Server grizzly/1.9.9 Content-Type application/javascript Transfer-Encoding chunked Date Mon, 18 Jan 2010 19:17:15 GMT Connection close Response = jsonp1263842210822({"msg":"[LDAP: error code 4 - Sizelimit Exceeded]"}) ============ I also find it strange that request is made with Accept Header = */* instead of "application/json" which is stated as dataType but should maybe be discussed in another topic... have tried using dataType : "jsonp" and skipped the callback info in url, this gives the exact same result though. On Jan 18, 7:09 pm, Nathan Klatt <n8kl...@gmail.com> wrote: > On Mon, Jan 18, 2010 at 11:05 AM, anton <anton.johans...@gmail.com> wrote: > > Can't seem to get any response from an ajax call which response is 400 > > Bad Request > > > $.ajax({ > > url: url > > type: "GET", > > Hey, is that missing comma after url a typo? > > Nathan