function reloadRecaptcha() { var publicKey = "6LcMd_ISAAAAADoqk3aEo0-Z2qhBkkUMATXPkcQv"; var div = "recap"; Recaptcha.create(publicKey,div,{theme: "white"}); return false; } function validate() { var challenge = Recaptcha.get_challenge(); var response = Recaptcha.get_response(); var remoteip = "3.144.2.48"; var valret=false; jQuery.ajax({ type: "POST", url: "https://www.blogaire.com//wp-content/plugins/blogaire-site-post/js/validateRecaptcha.php", async: false, data: { remoteip: remoteip, challenge: challenge, response: response }, success: function(resp) { if(resp == "true") { //document.getElementById("message").innerHTML = "Perfect!"; //alert ('ouiiiiiiii'); valret=true; } else { //document.getElementById("messagecaptcha").innerHTML = "Mauvais code! Merci de reesayer!"; //alert ('nnnoooo'); //reloadRecaptcha(); //return false; jQuery("label#captcha_error").show(); reloadRecaptcha(); jQuery("label#captcha_error").focus(); //valret=false; //j'ai changé la veleur de retour pour bypasser le captcha valret=true; } } }); return valret; } function ProcessFormAjax() { jQuery('.error').hide(); var errorNotice = jQuery('#error'), successNotice = jQuery('#success') refresher = jQuery('#refresher') submit = jQuery('#submit'); /* var theLanguage = jQuery('html').attr('lang'); if (theLanguage == 'de-DE') { var btnMsg = 'Aktualisieren'; } else { var btnMsg = 'Update'; } */ //validate(); /*jQuery("label#quiz_error").hide(); if (jQuery("input#blogaire_quiz").val() !== jQuery("input#blogaire_quiz_hidden").val()) { jQuery("label#quiz_error").show(); jQuery("input#blogaire_quiz").focus(); return false; } */ var vali=validate(); if (vali) { var nbmax=200; var nombreCaractere2 = jQuery('#blogaire_site_post_excerpt').val().length; if (nombreCaractere2