Hello,
I am currently learning to code for Confluence and I am hitting a bit of a wall that nobody can help me with, so here I am. I am trying to do a simple Ajax request to get a piece of information from our API, and I know my URL works (Postman validated), but nothing comes out of the request, as if it never went into the "done" part.
function getTestVersionText(templateData) {
var final_value;
var myurl="url_that_works"
AJS.$.ajax({
dataType: 'json',
url: myurl,
async: false
}).done(function () {
final_value = response.issues[0].key;
}).error(function (xhr, status, error) {
displayErrorMessage("error_message_tailored_for_company");
});
return final_value;
} Anything that jumps to your eyes as to why this wouldn't work ? If I make the function just return a value directly it shows on the page, so the xml and mapping xml/js page are ok.
Thank you