Hello, the functions are called in the XHR (status 200) but dont return anything as it should,. Even when i put an echo it doesnt return the echo. The path is correct
example
javascript
function userDetails(uid,apiBaseUrl,baseUrl,public_username,msgID,groupID)
{
var encodedata=JSON.stringify({"uid": uid,"public_username":public_username,"msgID":msgID});
var url;
url=apiBaseUrl+'api/publicUserDetailsTest';
ajaxPost(url,encodedata, function(data) {
if(data)
{
some code....
}
});
}
When i put an alert before ajaxPost(url,encodedata, function(data)
it alerts, if i put it after this line it DOESNT
PHP
function publicUserDetailsTest() {
echo 'xxxx';
}