ChatServer/pages/js/conversations.js

11 lines
No EOL
385 B
JavaScript

function addConversation() {
var json = JSON.stringify({ "action": "add" });
$.ajax({
url: "/conversations", data: json, method: "POST", success: function (result) {
document.getElementById("conversations").innerHTML += result;
}, error: function (result) {
showError(result.responseText);
}
});
return false;
}