knockout: How to call the functions of another view model
<p>I am using the knockout.js with the asp.net web api. I have created the messaging related functionality. i have created two separate view models one for sending the message and other for displaying the message.
I am facing the issue to implement the following functionality.  </p>

<pre><code>function SendMessagesViewModel() {
    var self = this;
    self.SendMessage = function () {
        $.ajax({
            url: _pageURL + "/api/Communication/SendMessage",
            type: "POST",
            contentType: "application/json;charset=utf-8",
            data: JSON.stringify(message),
            dataType: "json",
            success: function (response) {
                    if (response == true) {                       
                    // Call the DisplayMessage function of DisplayMessagesViewModel
                }
                },  
        });
        }
}

function DisplayMessagesViewModel() {
    var self = this;
    self.DisplayMessage = function () {
        $.ajax({
            url: _pageURL + "/api/Communication/DisplayMessage",
            type: "POST",
            contentType: "application/json;charset=utf-8",
            data: JSON.stringify(message),
            dataType: "json",
            success: function (response) {
                    if (response == true) {                       
                    //set observable which will be used to bind the html
                }
                },  
        });
        }
}
</code></pre>