I have the following call in my app:
...
var message = "<label style='font-weight: bold; font-size: 14px; color: Gray;'>" + currentPlayerName + "</label>: ";
$.ajax({
url: "/Game/SendMessage",
type: "POST",
data: "matchID=" + matchID + "&message=" + message,
dataType: "json",
success: function (result) {
if (result.Message != null) {
var div_MessagePanel = $("#div_MessagePanel");
$("#div_MessagePanel").append(result.Message + "<br />");
}
checkForUpdate();
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("Error occured 1!");
sendMessage(message);
}
});
When I call this function it always drops an error. I think there is a problem with the data that I want to send back to the server. Any help is appreciated. Thanks.