var formData = {}; formData["g-recaptcha-response"] = $(".g-recaptcha-response").val(); formData["message"] = $("#message").val(); formData.o = access_token; $.ajax({ url: $("#mainForm").attr('action'), type: "POST", data: formData, dataType: "json" }).always(function (res) { // if (res.sta) if (typeof res.responseJSON == "undefined") { data = res; } else { data = res.responseJSON; } $('*').animate({ scrollTop : 0 }, 1250); var style = (data.err == 1) ? "color: #FFEE58 !important" : ""; if (typeof data.result == "undefined") { var msg = data.message; } else { var msg = data.message + "  "; msg += ""; msg += AnonyPages.i18n.go_to_your_post; msg += ""; msg += "
" + AnonyPages.i18n.its_hashtag_is; msg += ""; msg += data.result.hashtag; msg += ""; } $("#title_message").html("" + msg + ""); $("#submitBtn").val(oSubmitBtnVal); $("#firstBtnTitle").html(AnonyPages.i18n.post_again); });