Hi folks,I am stuck atm.I have a repo webscript and a share webscript. The share webscript gets some json data from the repo webscript. Now I want to get the json data from the share webscript to the client side javascript using Alfresco.util.Ajax.jsonGet() or something similar. My problem is that the only error message I get is "undefined" and nothing else 😕The web scripts are working fine.Here my client side javascript:
Alfresco.util.Ajax.jsonGet(
{
url: Alfresco.constants.PROXY_URI + "/jsontest/getJson" ,
successCallback:
{
fn: function(response)
{
if (response.json)
{
var id= response.json.properties["id"];
Alfresco.util.PopupManager.displayMessage(
{
text: id
});
}
},
scope: this
},
failureCallback:
{
fn: function(response)
{
var error = "Error (failureCallback): " + response.responseText;
Alfresco.util.PopupManager.displayMessage(
{
text: error
});
},
scope: this
}
});
Is the code even working and extracting the json data properly? As I said the only message I get is "Error (failureCallback): undefined". All I want is that my var id has the value of the retrieven json data from field "id".Can someone help me please? I am no javascript expert 😕Thank you in advance