Anonymous Anonymous - 6 months ago
164 0

No description

ActionScript

dinges

function getChatBox(userId)
{
    $.ajax
    ({
        method: "POST",
        url: "/ChatApp/FriendChatController",
        dataType: 'json',
        data: { name: userId }
    })
    .done(function( msg )
    {
        var chatboxId = msg.chatbox;

        $( ".modal-title" ).empty();
        $( ".modal-title" ).append("Chatting with " + userId);
        getChatBoxData(chatboxId);

        $("#modalBtn").click();
    });
}

function getChatBoxData(chatboxId)
{
    $.ajax
    ({
        method: "GET",
        url: "/ChatApp/FriendChatController",
        dataType: 'json',
        data: { id: chatboxId }
    })
    .done(function( msg )
    {
        alert("heeyooo");

    });
}