2010-08-21 19:31:41 +03:00
|
|
|
function ajaxQuestionVote(idTopic,idAnswer) {
|
|
|
|
new Request.JSON({
|
2010-10-02 17:33:51 +03:00
|
|
|
url: aRouter['ajax']+'vote/question/',
|
2010-08-21 19:31:41 +03:00
|
|
|
noCache: true,
|
|
|
|
data: { idTopic: idTopic, idAnswer: idAnswer, security_ls_key: LIVESTREET_SECURITY_KEY },
|
|
|
|
onSuccess: function(result){
|
|
|
|
if (!result) {
|
2010-06-05 13:08:13 +03:00
|
|
|
msgErrorBox.alert('Error','Please try again later');
|
|
|
|
}
|
|
|
|
if (result.bStateError) {
|
|
|
|
msgErrorBox.alert(result.sMsgTitle,result.sMsg);
|
|
|
|
} else {
|
|
|
|
msgNoticeBox.alert(result.sMsgTitle,result.sMsg);
|
|
|
|
if ($('topic_question_area_'+idTopic)) {
|
|
|
|
$('topic_question_area_'+idTopic).set('html',result.sText);
|
|
|
|
}
|
2010-08-21 19:31:41 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
onFailure: function(){
|
|
|
|
msgErrorBox.alert('Error','Please try again later');
|
|
|
|
}
|
|
|
|
}).send();
|
2010-06-05 13:08:13 +03:00
|
|
|
}
|