function ChatServerQuery(data_json) {
        var result = null;
        $.ajax({
            url: 'chat/backend/',
            type: 'POST',
            data: data_json,
            success: function(json) {
                result = json
            }
        })
        return result
    }
My function that executes a request to the server. The problem is that I can not return received from the server text. I do not know how to take from an anonymous function (event success) to ChatServerQuery (where you can easily get it back).
 
     
     
     
     
     
    