I am using "livechatstarterkit" for chatting functionality in my mvc web app. But my web application is in a right to left language and users have names in Persian.
The problem here is that when a user with Persian name log-in as operator his name encoded cause of the following script:
<script type="text/javascript">
var intervalId;
var chatId = '@(Model)';
var lastMsgId = 0;
var opname = '@ViewBag.opname';
$(document).ready(function () {
getMsgs();
intervalId = window.setInterval(function () {
getMsgs();
}, 3210);
$('#chatText').keyup(function (e) {
if (e.keyCode == 13) {
$.post('/chat/addmsg', { id: chatId, from: opname, msg: $('#chatText').val() }, function (data) { getMsgs(); });
$('#chatText').val('');
}
});
.....
But as I debug my app, I see the messages from operator are not beign sent, in fact the $.post('/chat/addmsg'....
code is not executed and request is not sent to proper action.
here is some exaple of opname in jscript : "پشتیبانی
"