Return value of CSPro user defined functions in Javascript
Posted: December 14th, 2021, 10:40 pm
Dear CSPro Developer Team,
Testing the new CSPro 7.7 API, rather than using a standalone javascript hashing library, i'm using the CSPro logic hash function in a very simple user defined function
Thanks in advance for your support.
Testing the new CSPro 7.7 API, rather than using a standalone javascript hashing library, i'm using the CSPro logic hash function in a very simple user defined function
function string hashString(string value)
string hashResult=hash(value, 5);
errmsg ("le hash est %s",hashResult);
exit hashResult;
end;
However, assign his result to a javascript variable failed:
string hashResult=hash(value, 5);
errmsg ("le hash est %s",hashResult);
exit hashResult;
end;
Please what i'm doing wrong?var nomCategorie = document.getElementById("categoryName").value;
var idCategorie=CSPro.runLogicAsync('hashString("nomCategorie");');
var arguments = {nomCategorie,idCategorie};
alert(JSON.stringify(arguments));
Thanks in advance for your support.