function getCChatStatus() {
jQuery.ajax({
type: "POST",
url: "index.php?page=CChatAction",
data: { action: "getStatus" }
}).done(function(msg) {
var cChatStatus = jQuery.parseJSON(msg);
return cChatStatus;
});
}
function CChatOptions() {
var test = getCChatStatus();
alert(test);
}
is returning "test is undefined". How to solve this issue? I already tried async: false.
Thanks