فیلم/ کشف مشروبات الکلی و سلاح گرم از اراذل و اوباش
“);
//
”
$(“#PlusVote”).click(function () {
var targetElement= $(“#PlusVoteNumber”);
$.ajax({
type: “POST”,
url: “/News.aspx/Vote”,
data: JSON.stringify({ NewsID: 351202, vote: 1 }),
//data: ‘{ NewsID: ‘ + NewsID + ‘, vote: ‘ + 1 + ‘ }’,
contentType: “application/json; charset=utf-8”,
dataType: “json”,
success: function (response) {
if(response.d>0)
targetElement.html(response.d);
}
});
});
$(“#NegativeVote”).click(function () {
var targetElement= $(“#NegativeVoteNumber”);
$.ajax({
type: “POST”,
url: “/News.aspx/Vote”,
data: JSON.stringify({ NewsID: 351202, vote: 0 }),
//data: ‘{ NewsID: ‘ + NewsID + ‘, vote: ‘ + 1 + ‘ }’,
contentType: “application/json; charset=utf-8”,
dataType: “json”,
success: function (response) {
if(response.d>0)
targetElement.html(response.d);
}
});
});
$(“.commentPlusVote”).click(function () {
var targetElement= $(this).parent().find(“span”);
var i_CommentId=parseInt($(this).attr(“CommentId”));
$.ajax({
type: “POST”,
url: “/News.aspx/CommentVote”,
data: JSON.stringify({ CommentID: i_CommentId, vote: 1}),
contentType: “application/json; charset=utf-8”,
dataType: “json”,
success: function (response) {
if(response.d>0)
targetElement.text(response.d);
}
});
});
$(“.commentNegativeVote”).click(function () {
var targetElement= $(this).parent().find(“span”);
var i_CommentId=parseInt($(this).attr(“CommentId”));
$.ajax({
type: “POST”,
url: “/News.aspx/CommentVote”,
data: JSON.stringify({ CommentID:i_CommentId, vote: 0 }),
contentType: “application/json; charset=utf-8”,
dataType: “json”,
success: function (response) {
if(response.d>0)
targetElement.text(response.d);
}
});
});
$(“#btnCommentSubmit”).click(function () {
var txtName=$(“#txtCommentName”).val();
var txtEmail=$(“#txtCommentEmail”).val();
var txtText=$(“#txtCommentText”).val();
$.ajax({
type: “POST”,
url: “/News.aspx/SaveComment”,
data: JSON.stringify({NewsID: 351202, Name: txtName,Email:txtEmail,Text:txtText }),
//data: ‘{ NewsID: ‘ + NewsID + ‘, vote: ‘ + 1 + ‘ }’,
contentType: “application/json; charset=utf-8”,
dataType: “json”,
success: function (response) {
if(response.d==’success’)
$(“#divCommentResult”).addClass(“bgColor_green”).text(“نظر شما با موفقیت ثبت شد”).show(100);
else
$(“#divCommentResult”).addClass(“bgColor_red”).text(“نظر شما قبلا ثبت شده”).show(100);
}
});
});
})
function PrintDocument() {
window.open(‘/newsprint.aspx?id=’ + NewsID, ‘Print’);
}