‘);
}
var functionchange = function () {
if (
$ .trim ($ (“#CommentText”). Val ())! = “”
& Amp; & amp; (($ .trim ($ (“#CommentText”). Val ())! = “Comment” & amp; & amp;! $ (“#CommentText”). HasClass (“interview”)) || ($ .trim ( $ (“#CommentText”). val ())! = “Your opinion” & amp; & amp; $ (“#CommentText”). hasClass (“interview”)))
& Amp; & amp; $ .trim ($ (“#AuthorName”). Val ())! = “”
& Amp; & amp; $ .trim ($ (“#AuthorName”). Val ())! = “Your Name”
) {
$ (‘#sendCommentForm .coment_field Div.btn’). RemoveAttr (“disabled”);
$ (‘.coment_field .message’). Text (“”);
}
else
$ (‘#sendCommentForm .coment_field Div.btn’). Attr ({“disabled”: “disabled”});
};
$ (“#CommentText, #AuthorName”). Keyup (functionchange);
$ (“#CommentText, #AuthorName”). Blur (functionchange);
$ (“#CommentText, #AuthorName”). Click (functionchange);
$ (‘#sendCommentForm .coment_field Div.btn’). Click (function (el) {
if (
$ .trim ($ (“#CommentText”). Val ())! = “”
& Amp; & amp; (($ .trim ($ (“#CommentText”). Val ())! = “Comment” & amp; & amp;! $ (“#CommentText”). HasClass (“interview”)) || ($ .trim ( $ (“#CommentText”). val ())! = “Your opinion” & amp; & amp; $ (“#CommentText”). hasClass (“interview”)))
& Amp; & amp; $ .trim ($ (“#AuthorName”). Val ())! = “”
& Amp; & amp; $ .trim ($ (“#AuthorName”). Val ())! = “Your Name”
) {
$ (This) .attr ({“disabled”: “disabled”});
$ .ajax ({
type: “POST”,
url: “/ Ajax / AjaxSetCommentHash”,
data: {},
async: false,
success: function (d) {
$ (‘#CommentHash’). Val (d.guid);
}
});
$ .ajax ({
type: “POST”,
url: “/ Ajax / SendComment”,
data: {
CommentText: $ (“#CommentText”). Val (),
AuthorName: ($ .trim ($ (‘#AuthorName’). Val ()) == “Who are you”)? “Your name”: $ (‘#AuthorName’). Val (),
CommentHashID: $ (‘#CommentHash’). Val (),
NewsId: $ (‘#NewsId’). Val (),
ParentCommentId: $ (‘#ParentCommentId’). Val ()
}
async: false,
success: function (d) {
if (“yes” == d.result) {
$ (‘#commentForm’). Hide ();
$ (“#CommentText”). Val (”);
$ (‘#commentFormMessage’). Text (‘Your comment has successfully been sent to the administrator’);
$ (‘.coments_field .action_btn_blk .btn’). Show (200);
} Else if (“timeout” == d.result)
$ (‘#commentFormMessage’). Text (‘Warning: The number of messages per minute exceeded’);
$ (‘#sendCommentForm .coment_field Div.btn’). RemoveAttr (“disabled”);
return false;
}
});
}
else if ($ .trim ($ (“#AuthorName”). val ()) == “Your name”) {
$ (‘.coment_field .message’). Text (“Do not put a name”);
}
else if ($ .trim ($ (“#CommentText”). val ()) == “Comment” & amp; & amp;! $ (“#CommentText”). hasClass (“interview”)) {
$ (‘.coment_field .message’). Text (“Do not put a comment”);
}
else if ($ .trim ($ (“#CommentText”). val ()) == “Your opinion” & amp; & amp; $ (“#CommentText”). hasClass (“interview”)) {
$ (‘.coment_field .message’). Text (“Do not put a comment”);
}
return false;
});
});
Friday, March 13, 2015
Named the men’s national team of Russia on the baton to the Biathlon World Championships in Finland – IA Stadium
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment