|
|
|
| Добрый день,
у меня проблема с переменной, вот код:
$.post('/index.php?module=postreit', {postreit : postreit, user_from_id: user_from_id, user_to_id: user_to_id, CommentId: CommentId}, function(data) {
var Data = data;
document.getElementById("comment_num_vote_"+CommentId+"_note").style.display="none";
if (Data=="yes") {
document.getElementById("comment_num_vote_"+CommentId+"_yes").style.display="block";
} else {
document.getElementById("comment_num_vote_"+CommentId+"_no").style.display="block";
}
|
Скрипт при получении данных от этого js возвращает ответ: yes или no. Проблема в том, что когда я делаю сравнение переменной Data с значением yes, зная, что сервер вернул yes выдаётся результат для no. Где ошибка? | |
|
|