1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-18 14:24:28 +03:00
ifhub.club/templates/skin/new/js/questions.js
2009-01-10 19:11:09 +00:00

20 lines
766 B
JavaScript

function ajaxQuestionVote(idTopic,idAnswer) {
JsHttpRequest.query(
DIR_WEB_ROOT+'/include/ajax/questionVote.php',
{ idTopic: idTopic, idAnswer: idAnswer },
function(result, errors) {
if (!result) {
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);
}
}
},
true
);
}