<script> jQuery(document).ready(function($) { var vform= jQuery('#commentform'); vform.submit(function(e){ e.preventDefault(); var formURL = vform.attr('action'); var commentdata = { author : $('#author').val(), email : $('#email').val(), comment : $('#comment').val(), comment_post_ID: $('input[name=comment_post_ID]').val(), comment_parent: $('input[name=comment_parent]').val(), i_token: 'we4r5fre3' } var created =$.post(formURL,commentdata); $('#commentform').html('<img id="pend-load" src="http://blog.magextechnologies.com/wp-content/plugins/no-spam-at-all/img/loading.gif"/>'); created.done(function(thetext) { if(thetext =="too much tag"){ $('#commentform').html('<p class="error"> Not All tags are allowed! Please remove html tags from your comments and try again </p>'); var i = 2; setInterval(function () { if(i == 0) { window.location = window.location.href; } i--; }, 1000); //console.log( thetext ); } else{ $('#commentform').html('<p class="success"> <span> <img src="http://blog.magextechnologies.com/wp-content/plugins/no-spam-at-all/img/good.png"> </span>Love your comment </p>'); //console.log(thetext); var i = 2; setInterval(function () { if(i == 0) { window.location = window.location.href; } i--; }, 1000); } }); created.fail(function( failtext ){ // console.log( failtext ); $('#commentform').html('<p class="error">Love your ruins</p>'); var i = 2; setInterval(function () { if(i == 0) { window.location = window.location.href; } i--; }, 1000); }); }); }); </script> <script type='text/javascript'> /* <![CDATA[ */ var FB_WP=FB_WP||{};FB_WP.queue={_methods:[],flushed:false,add:function(fn){FB_WP.queue.flushed?fn():FB_WP.queue._methods.push(fn)},flush:function(){for(var fn;fn=FB_WP.queue._methods.shift();){fn()}FB_WP.queue.flushed=true}};window.fbAsyncInit=function(){FB.init({"xfbml":true,"appId":"149461708573788"});if(FB_WP && FB_WP.queue && FB_WP.queue.flush){FB_WP.queue.flush()}} /* ]]> */ </script> <script type="text/javascript">(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return}js=d.createElement(s);js.id=id;js.src="http:\/\/connect.facebook.net\/fr_FR\/all.js";fjs.parentNode.insertBefore(js,fjs)}(document,"script","facebook-jssdk"));</script> <script type='text/javascript' src='http://blog.magextechnologies.com/wp-includes/js/wp-embed.min.js?ver=4.8.4'></script> <div id="fb-root"></div> </body> </html>