Hi all,
I'm developping plugins for Jira 5.1. Actually, I need to use json data returned from a rest service.
I have the following code:
jQuery.getJSON("http://myhost.xx/myservice") .success(function(data){ alert("success!!!!!!"); }) .error(function(jqXhr, textStatus, error) { alert("ERROR: " + textStatus + ", " + error); });
The funny thing is that, even I can see a correct response (200 accept, correct content type (text/json), correct body) with my http debugger (Fiddler), I only enter the "error" handler and I see "OK" for both textStatus and error parameters, ending in displaying the alert "ERROR: OK, OK" in my browser...
Any idea? Is there any known bug with the javascript shipped with Jira 5.1?
Thanks a lot !
Fixed, using a JSONP query type, and after transforming the backend, it works better
although its an old post but it might help others.I was having the same problem and i found out the data i am getting from server was not in correct json format so it was giving me error.i fixed that and the thing got fixed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
same behavior...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have seen something very similar before. Can't remember the solution - but try using jQuery.ajax instead of getJSON, with "dataType:'json'"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works perfectly fine with jQuery v1.4.4
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Exact same behavior using AJS.$() instead of jQuery()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.